|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
The case of the crazy reseting dropdowns :-( Please help!I keep getting a problem with dropdownlist controls. It sounds really stupid, but my app is screwed as long as this keeps happening. It seems to spontaneously happen and then I cant fix it without rebuilding the whole page from scratch! Not Fun. :-( So whats happening is I have my dropdowns on the page. The user comes along and selects an option, but when the user submits the page,. its as if nothing was changed. The dropdowns all reset themselves to the default values. No modified value reaches the server so its not just a view state thing (I think). So basically, my dropdowns just dont work. Bear in mind, that these were all working perfectly before. I then do some trivial work to the page - adding controls and the like, and the whole thing just buggers up! Can anyone think whats happening here? What would cause dropdown controls to just stop sending their values and reset themselves? If anyone at all has even the stupidist suggestion I would be so grateful if you could tell me cos this is getting really serious. Its supposed to be live now! :-( Thanks to anyone who can helpSimon Simon,
Do your dropdown controls have their AutoPostback property set to "true"? This is required if you want a change by the user to cause a postback and fire the SelectedIndexChanged event where you can handle the event. Peter -- Show quoteHide quoteCo-founder, Eggheadcafe.com developer portal: http://www.eggheadcafe.com UnBlog: http://petesbloggerama.blogspot.com "Simon Harvey" wrote: > Hi everyone, > > I keep getting a problem with dropdownlist controls. It sounds really stupid, > but my app is screwed as long as this keeps happening. > > It seems to spontaneously happen and then I cant fix it without rebuilding > the whole page from scratch! Not Fun. :-( > > So whats happening is I have my dropdowns on the page. The user comes along > and selects an option, but when the user submits the page,. its as if nothing > was changed. > The dropdowns all reset themselves to the default values. No modified value > reaches the server so its not just a view state thing (I think). > > So basically, my dropdowns just dont work. Bear in mind, that these were > all working perfectly before. I then do some trivial work to the page - adding > controls and the like, and the whole thing just buggers up! > > Can anyone think whats happening here? What would cause dropdown controls > to just stop sending their values and reset themselves? > > If anyone at all has even the stupidist suggestion I would be so grateful > if you could tell me cos this is getting really serious. Its supposed to > be live now! > > :-( > > Thanks to anyone who can help > > Simon > > > After the user submits the form, how are you getting the values from
the drop downs? After the form is submitted does yourDropDown.SelectedValue = "" - or the default value? Have you tried Request.Form("youDropDown")? Does that still equal ""? Can you reply back with some code for us? Jeremy Reid http://blackstaronline.net/hgtit are you filling up your combobox each time the page loads? did you use "if
(!Page.IsPostBack)" is not, you should, it's probably your problem. I hope it helps ThunderMusic Show quoteHide quote "Simon Harvey" <notha***@hotmail.com> wrote in message news:94a1890869bf8c8038d5030666f@news.microsoft.com... > Hi everyone, > > I keep getting a problem with dropdownlist controls. It sounds really > stupid, but my app is screwed as long as this keeps happening. > > It seems to spontaneously happen and then I cant fix it without rebuilding > the whole page from scratch! Not Fun. :-( > > So whats happening is I have my dropdowns on the page. The user comes > along and selects an option, but when the user submits the page,. its as > if nothing was changed. > The dropdowns all reset themselves to the default values. No modified > value reaches the server so its not just a view state thing (I think). > > So basically, my dropdowns just dont work. Bear in mind, that these were > all working perfectly before. I then do some trivial work to the page - > adding controls and the like, and the whole thing just buggers up! > Can anyone think whats happening here? What would cause dropdown controls > to just stop sending their values and reset themselves? > > If anyone at all has even the stupidist suggestion I would be so grateful > if you could tell me cos this is getting really serious. Its supposed to > be live now! > > :-( > > Thanks to anyone who can help > > Simon > >
Image Rollovers with the Hyperlink Control
Converting the time from one timezone to another Looking for a book on writing ASP.NET Controls with VB.NET Passing Values into Formview or DetailsView GridView ASP.NET 2.0 Question Master Pages session variables Populate dropdown/listbox formview general request about links CompileWith |
|||||||||||||||||||||||