D
Dharmen
Hey Guys,
I have a SQL database called price and a table called TB1, in it i have a
column called "loc"
I want to display the tiems in "loc" in a drop down list. I am able to do
this in a datagrid.
This is the code im using to display in datagrid:
SqlConnection Conn=new SqlConnection("Data Source=localhost;Database=price;
Integrated Security=SSPI;" +
"Initial Catalog=price");
Conn.Open();
string sqlString="SELECT Loc FROM TB1";
SqlCommand Comm = new SqlCommand(sqlString,Conn);
ddList1.DataSource=Comm.ExecuteReader();
ddList1.DataBind();
ddList1.
Conn.Close();
Can someone Please shwo me how to display this column in a DropDownList???
Thanks
I have a SQL database called price and a table called TB1, in it i have a
column called "loc"
I want to display the tiems in "loc" in a drop down list. I am able to do
this in a datagrid.
This is the code im using to display in datagrid:
SqlConnection Conn=new SqlConnection("Data Source=localhost;Database=price;
Integrated Security=SSPI;" +
"Initial Catalog=price");
Conn.Open();
string sqlString="SELECT Loc FROM TB1";
SqlCommand Comm = new SqlCommand(sqlString,Conn);
ddList1.DataSource=Comm.ExecuteReader();
ddList1.DataBind();
ddList1.
Conn.Close();
Can someone Please shwo me how to display this column in a DropDownList???
Thanks