ASP.NET ListBoxes, SelectedValue and ViewState

Posted by: Rick Strahls WebLog, on 18 Mar 2006 | View original

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
The leading UI suite for ASP.NET - Telerik radControls
Outstanding performance. Full ASP.NET AJAX support. Nearly codeless development.

Similar Posts

  • August 9th ASP.NET Link-Listing more
  • Frames, ASPX Pages and Rejected Cookies more
  • SDC Sessions - THE CODE more
  • Tech Ed 2006 Summary more
  • Avoid IISRESET in ASP.NET applications (added bonus: ASPRESET) more
  • Software Development Conference 2006 more
  • What causes ViewState Errors more
  • Sharepoint 2007 - Enabling Custom Authentication using a Custom Membership Provider more
  • Failure to start monitoring changes / Unable to start debugging on the web server more
  • ASPProtect.NET Authentication Add-On Released more

News Categories

.NET | ADO.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Community Server | dasBlog | 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