Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dropdownlist postback problems

Status
Not open for further replies.

ebarratt

Programmer
Apr 10, 2002
53
0
0
US
Hey all,


I'm having issues. I have a drop down list populated with values from a database which is working fine. Then the user has the option to add a new option by clicking an asp.net submit button that calls a javascript function to add it to the dropdownlist. However, when the page is posted back the option isn't in the dropdownlist. I know the javascript function is adding the new option to the dropdownlist but the postback is removing it. Any advice would be awesome thanks all!

Errol *** Any suggestions to my asp.net site would be great if your bored!
 
make sure that any code in your page load that fills the drop down list is inside a

If not page.ispostback Then

End If

statement, otherwise every time your page posts back, your ddl will fill itself.

D'Arcy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top