Reload a page to refresh it's information

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Eyadtrabulsi
    New Member
    • Mar 2007
    • 40

    Reload a page to refresh it's information

    I have written code to creat .txt file then refreshing the information on the webpage to contain the content of the new generated file..
    The page doesn't reflect the refreshment till the second reloading

    How can I let it responses better...

    Here is the code which relates to the clicked button:



    protected void SubmitBtn_Click (object sender, EventArgs e)
    {
    MyStream mystream = new MyStream();
    mystream.AllTex t = GuestTextArea.I nnerText;
    // Display information about posted file


    tryagain:
    mystream.FileNa me = Server.MapPath( "text/guestbook/") + i + ".txt";
    if (File.Exists(my stream.FileName ))
    {
    i++;
    goto tryagain;
    }
    Label1.Text = mystream.FileNa me;
    mystream.CreatA ndWrite(mystrea m.AllText);
    i++;
    }

    Please help me..
  • Eyadtrabulsi
    New Member
    • Mar 2007
    • 40

    #2
    Why does it act like this despite the code shows declared reaction..?

    Comment

    Working...