fetch coloumn's value from sqlserver and bind to textobox
how to fetch the data from table by using storeprocedures from asp.net and how to bind result value to textbox?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Tanmay MulePosted Feb 11, 2015, 7:35 AM
these two lines are enough to bind the data from database to dropdownlist
Dawood AbbasPosted Feb 11, 2015, 7:21 AM
above is my code then where to bind 'select' value
Tanmay MulePosted Feb 11, 2015, 7:04 AM
Dawood AbbasPosted Feb 11, 2015, 6:57 AM
Dawood AbbasPosted Feb 11, 2015, 6:43 AM
Tanmay MulePosted Feb 11, 2015, 6:30 AM
Khargesh RajputPosted Feb 11, 2015, 6:25 AM
con.Open();
SqlCommand comm=new SqlCommand ("SP_name",con); comm.CommandType=CommandType.StoredProcedure;
SqlDataAdapter da= new SqlDataAdapter(comm);
DataSet ds = new DataSet();
da.Fill(ds);
txtbx.Text = ds.Tables[0].Rows[0]["columnname"].ToString();
con.Close();
Dawood AbbasPosted Feb 11, 2015, 6:24 AM
but when first value binded in dropdownlist not getting when selecting other item then its getting in textbox.
so how to bind 'select' value to dropdownlist when this dropdownlist binding from 'sqlDataSource'
Tanmay MulePosted Feb 11, 2015, 6:09 AM
https://msdn.microsoft.com/en-us/library/e80y5yhx%28v=vs.110%29.aspx
But actual tutorial you will get from here
http://www.pragimtech.com/Free-aspnet-video-tutorial.aspx
Dawood AbbasPosted Feb 11, 2015, 5:59 AM
Tanmay MulePosted Feb 11, 2015, 5:56 AM