Asp.Net News
Free Tech Magazines
Asp.Net Web Hosting
Suggest Us
Link to Us
Feeds Subscription
Questions & Answers
Tips & Tricks
 Back button in client side
Posted by Jijil K.B on  10/1/2010 5:22:48 AM Category: Asp.Net 2.0
Add to my favorites
Email to friend
How to create back button in c#.when I click the button it go to specific previously page.

Post Your Reply Post New Question

 Viewer's Reply
Back Button with Client-Side Script in Asp.Net Code-behind
Answered By Moderator1 on 10/1/2010 8:18:57 PM

Place an Asp.Net control in your aspx page, label it as "Back". In the code-behind, Page_Load event, code as below,

protected void Page_Load(object sender, EventArgs e)
this.Button1.OnClientClick = "window.history.go(-1);return false;";
back button in c#
Answered By Jijil K.B on 10/2/2010 9:02:18 AM

I Created a web form(first page) .It contains some details about a person and a print

button.I click the print button it go to second page .This page will get the crystal report.I

clicked the print button on the report and show preview of crystal report print and take

the print.second page also contain back button. I need when click the back button it go to

first page without reloading.but I click the back button it go to previous state of current

page. Because second page was more time reloaded .

Can I go to first page when I click the back button in first time?

I place th belowcode in pageload.

this.Lbtnback.OnClientClick = "window.history.go(-1);return false;";
Post Your Reply If you still have problem, post it again under this reply for better response.

Sponsored by
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
Many .NET teams are underperforming, is yours?
Easing the Migration to Microsoft SQL Server 2005