Thursday, March 22, 2012

ListBox and Postback

Hello,

In my page, there are a few listboxes. Whenever the user changes an item a postback occurs, thus the page is refreshed. This is not very user-friendly. I would like to know if there is a way to avoid this postbacks and retrieve the "SelectedItem" or "SelectedValue" when the page is reloaded (I have a button that saves some of the page's content).

Thanks
MikeSet the 'AutoPostback' attribute of the control to false.

--
- Paul Glavich
Microsoft MVP - ASP.NET

"Mike" <nospam@.nospam.com> wrote in message news:%23BepDi7aEHA.3480@.TK2MSFTNGP11.phx.gbl...

Hello,

In my page, there are a few listboxes. Whenever the user changes an item a postback occurs, thus the page is refreshed. This is not very user-friendly. I would like to know if there is a way to avoid this postbacks and retrieve the "SelectedItem" or "SelectedValue" when the page is reloaded (I have a button that saves some of the page's content).

Thanks
Mike

0 comments:

Post a Comment