ASP.NET ListBoxes, SelectedValue and ViewState

Posted by: Rick Strahls WebLog, on 18 Mar 2006 | View original | Bookmarked: 0 time(s)

Aarrgh. Am I the only one who's repeatedly cursing the way ListBoxes and the OnSelectedIndexChanged event and SelectedValue assignments work in ASP.NET when ViewState is off?   If you turn off ViewState on a ListBox or DropDownList control it's a real bitch to deal with the OnSelectedIndexChanged event. Take the following scenario assuming you set ViewState off for the lstCustomers control:   protected void Page_Load(object sender, EventArgs e) {     Customer = new busCustomer();    ...

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: ASP.NET | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 3932 | Hits: 340

Similar Posts

  • Entity Framework object graphs and viewstate more
  • Entities, Viewstate and postback more
  • Login control and ViewState on successful logon more
  • Move the ViewState off the client and cache it on the server more
  • ViewState Chunking in ASP.NET 2.0 (maxPageStateFieldLength) more
  • Search Engine Optimization for .NET more
  • ASP.NET: TreeView selection - SelectAction tip/trick more
  • Viewstate Security & WebFarms more
  • ASP.NET Podcast Show #30 - Minimizing the ASP.NET ViewState Part #2 more
  • [Solid Quality ASP.NET] Bits and pieces of your viewstate more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD