objsqlconnection = new SqlConnection(strconnectionstring);
DataSet ds=new DataSet();
string strquery1 = "select * from tblCollege_Info";
objsqlcommand = new SqlCommand(strquery1, objsqlconnection);
OleDbAdapter a=new OleDbAdapter();
a.selectCommand=objsqlcommand;
a.fill(ds,"tblCollege_Info");
try
{
ddlCollegename.DataSource=ds;
ddlCollegename.DataTextField="Collegename";
ddlCollegename.DataValueField="ID";
}
catch
{
Console.WriteLine("Error!!!!!!!1");
}
finally
{
objsqlconnection.Close();