troubleshooting Question

ASP.NET AJAX Change a textbox two times through one lifecycle

Avatar of Elite_Bigfoot
Elite_Bigfoot asked on
C#ASP.NETWeb Applications
15 Comments2 Solutions738 ViewsLast Modified:

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">
                        <asp:TextBox runat="server" ID="Date" Width="50px"/>
                       <asp:Button ID="Button" runat="server" Text="Button" onclick="Button_Click" />

    protected void Button_Click(object sender, EventArgs e)
        Date.Text = "start";        

        int i=0;
        while (i < 1000000000)

        Date.Text = "end";      

Thanks a lot!
Join our community to see this answer!
Unlock 2 Answers and 15 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 15 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros