Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

loading page and ispostback question 1

Status
Not open for further replies.

wawalter

Programmer
Aug 2, 2001
125
US
Hello,

I'm using ASP.net 2 with C#. My question is I have a web form where the user will fill out some info then click a save button. The save button will save an object then I want to reload the page reset to its original state as if they just opened the page.

Is there a way to reset the ispostback property? Also, what is the best way to switch pages in a button? Currently, I use server.transfer, but I wonder if there is a better way.

Thanks,
Bill
 
You could either store the original info in a session variable or you could create a history record in the database and show that data instead.

To "switch" pages, try using Response.Redirect.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
The response.redirect solved both my problems. It must call the page as if it is new instead of posting back.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top