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..
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..
Comment