How to show the previous page data as it is on button click?
I have 2 webforms default.aspx and default1.aspx.
In default.aspx I have a button on button click event it redirects to default1.aspx?sno=1
then on default1.aspx I have a button back. On back button click the us开发者_开发百科er is redirected to previous page default.aspx.
How can I do this?
Write following code in default1.aspx page
<input type="button" value="Back" onClick="javascript: history.go(-1)">
You can redirect to previous page using Javascript or server.Transfer or PostBackUrl property of button control. You can use any one property that will help for you.
精彩评论