TIA
"MikeB" <m...@nospam.com> wrote in message
news:OXE2RZ5...@TK2MSFTNGP06.phx.gbl...
protected void Button1_Click(object sender, EventArgs e)
{
Thread firstThread = new Thread(new ThreadStart(Coundown));
firstThread.Start();
}
public void Coundown()
{
for (int i = 0; i < 100; i++)
{
ListBox1.Items.Add(i.ToString());
Thread.Sleep(250);
}
}
Here is my aspx page:
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:ListBox ID="ListBox1" runat="server"
Width="498px"></asp:ListBox>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ListBox1"
EventName="SelectedIndexChanged" />
</Triggers>
</asp:UpdatePanel>
</div>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click"
Text="Button" />
</form>
"IfThenElse" <sql_ag...@hotmail.com> wrote in message
news:%23Q1Fef5...@TK2MSFTNGP04.phx.gbl...
"MikeB" <m...@nospam.com> wrote in message
news:%23gV7105...@TK2MSFTNGP04.phx.gbl...
"IfThenElse" <sql_ag...@hotmail.com> wrote in message
news:%23wCVk65...@TK2MSFTNGP02.phx.gbl...
"MikeB" <m...@nospam.com> wrote in message
news:eUtDJ$5CIHA...@TK2MSFTNGP06.phx.gbl...
the updatepanel when triggered:
1. javascript sends a request to page with all form fields via
xmlhttprequest
2. the server processes the form data like a normal postback
3. the server runs a special render that only renders the updatepanel(s)
4. the server sends updatepanel html back the client
5. a javascript async event is fired by xmlhttprequest when the html is
returned
6. javascript event handler replaces the contents of the updatepanel
with the html
so nothing happens in the update anel until the html is sent back.
-- bruce (sqlwork.com)
UpdatePanel1.update();
This will refresh the update panel from outside of the updatepanel to
reflect the changes in the list.
Bjorn
"MikeB" <m...@nospam.com> wrote in message
news:eUtDJ$5CIHA...@TK2MSFTNGP06.phx.gbl...