خوب دوست عزیز با استفاده از SQLCommand دستوراتی رو که نوشتم اجرا کن نتیجه اش میشه همانی که شما می خواهی!!!!!
SqlConnection cnn = new SqlConnection(ConfigurationManager.ConnectionStrin gs["myConnection"].ConnectionString);
SqlCommand cmd = new SqlCommand("sp_Databases",cnn);
cmd.CommandType = CommandType.StoreProcedure;
try{
cnn.Open();
SqlDataReader reader = cmd.ExecuteReader();
while(reader.Read()
{
ListBoxDatabases.Items.Add(reader[0].ToString());
}
reader.Close();
}
catch(Exception ex)
{
throw;
}
finally
{
if(cnn != null)
cnn.Close();
}
و همینطور ادامه بده تا انتها ....