i have this code...i m retreiveing did from selected name........
i want to assign this to varible because i want to use this variable to another place...
i hope i will get help here..
MyDataAdapter = new SqlDataAdapter("select D_Id from tblDepart where D_Name = '" + D_Name + "'", Myconnection);
myDataSet = new DataSet();
MyDataAdapter.Fill(myDataSet);
int a = Convert.ToInt16(myDataSet);