How can use back button in asp.net

Posted by Sekar.C under ASP.NET on 7/30/2012 | Points: 10 | Views : 1304 | Status : [Member] | Replies : 5
Hi,
How can use back button in asp.net. I have 2 aspx pages page1, page2 if I click back button in page2 move to page1 .

Regards
Sekar.c



Responses

Posted by: Agopi.Net on: 7/30/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,

You can use thin in JavaScript function. Please try this

function nokeydown()
{
if ((event.keyCode == 8) || (event.keyCode == 116)) //backspace=8 and F5=116
{
event.keyCode = 0;
event.returnValue = true;
}
}

Regards,
Gopi A

Sekar.C, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Oswaldlily on: 7/31/2012 [Member] Starter | Points: 25

Up
0
Down
In page2,under this function
private void back_button(>.....)
{


response.redirect("Page1.aspx");

}

Sekar.C, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: CGN007 on: 7/31/2012 [Member] Silver | Points: 25

Up
0
Down
Please refer this also,http://www.dotnetcurry.com/ShowArticle.aspx?ID=89

Sekar.C, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: CGN007 on: 7/31/2012 [Member] Silver | Points: 25

Up
0
Down
This code will not work if javascript is disabled,but most of the browsers supports javascript.

1. Write this script
<script language="javascript" type="text/javascript">
function Back()
{
history.go(-1);
return false;
}

</script>


2. Now in Button click

//<input type="submit" name="btnEdit" value="Back" onclick="return Back();" id="btnEdit" class="buttonstyle" />///


Source:http://forums.asp.net/t/1134287.aspx/1


Sekar.C, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: CGN007 on: 7/31/2012 [Member] Silver | Points: 25

Up
0
Down
Mark as answer if it helps...,That motivates...!!!

Sekar.C, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response