Tanmay Mule26 reputationPosted Feb 11, 2015, 1:09 AM EST
0
here is link of MSDN for ADO.NET: 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
0
Dawood AbbasRank #6,413 · 267 reputationPosted Feb 11, 2015, 1:24 AM EST
0
iam getting by this 'txtPackPriceEdit.Text = command.ExecuteScalar().ToString();' 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 Mule26 reputationPosted Feb 11, 2015, 1:30 AM EST
0
You need to make AutoPostBack property of Dropdownlist to true
0
Dawood AbbasRank #6,413 · 267 reputationPosted Feb 11, 2015, 1:43 AM EST
0
I did autopostback to it but how to display 'select' value to another dropdown list when iam cascading this second dropdownlist by sqlDataSource from dropdownlist option '>'
0
Dawood AbbasRank #6,413 · 267 reputationPosted Feb 11, 2015, 1:57 AM EST
0
Thank you Mr. Khargesh Rajput .I got what I need exactly, but same 'select' value issuing.
Tanmay Mule26 reputationPosted Feb 11, 2015, 2:04 AM EST
0
In selectedIndexChanged() Event of first dropdownlist write a code whatever you want to do after the "select value" is changed.... like displaying it in textbox or filling the items in another dropdownlist
0
Dawood AbbasRank #6,413 · 267 reputationPosted Feb 11, 2015, 2:21 AM EST
Khargesh RajputRank #616 · 3.9K reputationPosted Feb 11, 2015, 1:25 AM EST
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();
Tanmay Mule26 reputationPosted Feb 11, 2015, 12:56 AM EST
Dawood AbbasRank #6,413 · 267 reputationPosted Feb 11, 2015, 12:59 AM EST
Tanmay Mule26 reputationPosted Feb 11, 2015, 1:09 AM EST
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 AbbasRank #6,413 · 267 reputationPosted Feb 11, 2015, 1:24 AM EST
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 Mule26 reputationPosted Feb 11, 2015, 1:30 AM EST
Dawood AbbasRank #6,413 · 267 reputationPosted Feb 11, 2015, 1:43 AM EST
Dawood AbbasRank #6,413 · 267 reputationPosted Feb 11, 2015, 1:57 AM EST
Tanmay Mule26 reputationPosted Feb 11, 2015, 2:04 AM EST
Dawood AbbasRank #6,413 · 267 reputationPosted Feb 11, 2015, 2:21 AM EST
above is my code then where to bind 'select' value
Tanmay Mule26 reputationPosted Feb 11, 2015, 2:35 AM EST
these two lines are enough to bind the data from database to dropdownlist
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts