Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Drop down doesn't reset when dataset changes
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
C# 2.0
OS:
Windows 2000
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01144228
Message ID:
01144718
Views:
19
Linda,

>I have a drop down list on a web form that is bound to a business object. It was working correctly until I added a new item to the list with a blank display value and 0 as the control value. I did that in an override of the form's OnPreRender method, also setting the control's initial value to 0. Now when I pull up a record, the drop down value remains 0. Do I need to set the drop down list programmatically? Shouldn't that set once I get a new dataset?

I'm guessing your code in the OnPreRender() method is always getting fired. You may want to check a condition (possibly a session variable) to determine whether or not to set the initial value to zero.

Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform