Hello,
In my page, there are a few listboxes. Whenever the user changes an item a p
ostback 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 bu
tton that saves some of the page's content).
Thanks
MikeYou should set the AutoPostBack property to false on all the listboxes.
You will be able to reference the selected items as you have described when
the page does postback.
hope this helps,
John
"Mike" wrote:
> Hello,
> In my page, there are a few listboxes. Whenever the user changes an item a postbac
k occurs, thus the page is refreshed. This is not very user-friendly. I would like t
o know if there is a way to avoid this postbacks and retrieve the "SelectedItem" or
"Se
lectedValue" when the page is reloaded (I have a button that saves some of the page's conte
nt).
> Thanks
> Mike
>
You'll want to override the Page'ss Render event if you want to allow other
object to process first.
"simon" wrote:
> I have asp:listbox on the page and I would like to fill it with the values
> after the page is load,
> that the user can read other parts of the page meanwhile.
> How can I do that?
> I have very large codetables in my listboxes and the page loads too long
> time.
> Thank you for your answer,
> Simon
>
>
"simon" <simon.zupan@.stud-moderna.si> wrote in message
news:OnzruuVbEHA.212@.TK2MSFTNGP12.phx.gbl...
> I have asp:listbox on the page and I would like to fill it with the values
> after the page is load,
> that the user can read other parts of the page meanwhile.
> How can I do that?
> I have very large codetables in my listboxes and the page loads too long
> time.
Simon,
There isn't really a good way to do that. Keep in mind that your page is
just text in HTML format. What you're asking for is that the server should
first generate an "empty" page:
<html>
<body>
<select>
<option>Please wait...</option>
</select>
</body>
</html>
and then, later, when the data are all loaded, you want to generate a new
page:
<html>
<body>
<select>
<option>Data from row 0</option>
<option>Data from row 1</option>
<option>Data from row 2</option>
..
<option>Data from row n</option>
</select>
</body>
</html>
This is effectively two separate pages.
The following articles may help you some:
Make a Progress Indicator For Slow-Loading Pages
(http://www.aspnetpro.com/Newsletter...bm_l/asp200308b
m_l.asp)
DESIGN PATTERNS: Asynchronous Wait State Pattern in ASP.NET
http://msdn.microsoft.com/msdnmag/i...ns/default.aspx
--
John Saunders
johnwsaundersiii at hotmail
P.S. Note that this becomes easier in ASP.NET 2.0, at least for clients
running IE 5.5 and above.
thank you.
So user can see and read the page while list box controls are filling?
Do you have some example or link?
Thank you,
Simon
<David Coe>; "MCAD" <DavidCoeMCAD@.discussions.microsoft.com> wrote in
message news:556960F2-4AF8-4F28-A5BE-2EF5B04D17DB@.microsoft.com...
> You'll want to override the Page'ss Render event if you want to allow
other object to process first.
> "simon" wrote:
>
values
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment