Start Free Trial
Come for the solution, stay for everything else.
Start Free Trial
Setting the index value of a dropdownlist when its created
I have a dropdownlist in asp.net 2.0.
This dropdownlist is populated from a SQLDATASOURCE control.
When the control is created the 1st item in the list does not let me click on it. I am pasting the code below. Please help.
<asp:SqlDataSource ID="TemplateSource" runat="server"
SelectCommand="select * from Template inner join Templatedetail on tmptype = RepType order by tmpName"
<asp:DropDownList id="TemplateList" Runat="Server"
Web Languages and Standards
8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Log in or sign up to see answer
Become an EE member today
7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
This is not working.
I have this drop down list being rendered inside a view control.
The values in the dropdown list are being generated from asp datacontrol and are not being populated from any vb event. I tried using your code in on load...and from the onclick event of the button on the previous page....and it doesnt seem to affect the dropdownlist....
How would you suggest I apply this code...?
ahh..I used the on Pre render event to fire this change....
Thanks for the help
Your help has saved me hundreds of hours of internet surfing.
Plans and Pricing
Certified Expert Program
© 1996-2022 Experts Exchange, LLC. All rights reserved. Covered by US Patent