Hello,
I would like my button to change a textbox two times during one lifecycle, Meaning,
When I click it, I would like first to see in the textbox - "start" and then after a few seconds "end"
However, with my following I only get "end" after the loop ends (take few seconds)
I understand that's how ajax lifecycle works, is there any way someone could suggest to manipulate it?
This is my code:
<asp:UpdatePanel ID="upResult" runat="server">
<ContentTemplate>
<asp:TextBox runat="server" ID="Date" Width="50px"/>
<asp:Button ID="Button" runat="server" Text="Button" onclick="Button_Click" />
</ContentTemplate>
</asp:UpdatePanel>
protected void Button_Click(object sender, EventArgs e)
{
Date.Text = "start";
int i=0;
while (i < 1000000000)
{
i++;
}
Date.Text = "end";
}
Thanks a lot!