ASP.NET ListBoxes, SelectedValue and ViewState

Posted by: Rick Strahls WebLog, on 18 Mar 2006 | View original | NEW 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
Category: ASP.NET | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 3322 | Hits: 326

Similar Posts

  • ASP.NET: TreeView selection - SelectAction tip/trick more
  • ViewState Chunking in ASP.NET 2.0 (maxPageStateFieldLength) more
  • Search Engine Optimization for .NET more
  • Login control and ViewState on successful logon more
  • Entities, Viewstate and postback more
  • Search Engine Optimization for .NET more
  • Move the ViewState off the client and cache it on the server more
  • Entity Framework object graphs and viewstate more
  • Search Engine Optimization for .NET more
  • Search Engine Optimization for .NET 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