HI, i was wondering if UpdatePanel could be trigger after the page is loaded.
Im trying to load a grid view inside an update panel without using any button event.
Thanks!
you could use a timer:
<asp:Timer ID="refreshTimer" runat="server" Interval="1000">
</asp:Timer>
<asp:UpdatePanel>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="refreshTimer" EventName="Tick" />
</Triggers>
</asp:UpdatePanel>
The update panel will be refreshed every 1 second, so you could decide what to show in it without any button events.
Thanks Yani for the reply, but using the timer will always refresh may updatepanel and this will create/increase server process a lot.
Still havent found a solution to my problems thru self coding. Looks like im going to use xmlhttp to load a div tag and put it inside an update panel so that when a year list box is changed it will reload the div content via javascript again.
Is there an alternative way in doing this?
Use Year select box(DropDownList) as an AsyncPostbackTrigger And put the Gridview inside update panel.
If I'm understanding correctly, you want to load the page initially with an empty UpdatePanel and then immediately do an async postback to load the contents of the UpdatePanel, right? (I assume this is because it takes a long time to load the data for that UpdatePanel.)
Check out my latest blog post:http://smarx.com/posts/delayed-load-with-an-updatepanel.aspx.
1 comment:
Panel Control for WinForms
Post a Comment