?
Solved

Back button is not working properly

Posted on 2013-06-03
3
Medium Priority
?
303 Views
Last Modified: 2013-06-12
I have a web form with back button in .NET 3.5 web application created using VS2010  .
I am using  this line in the page load event.
btnBack.Attributes.Add("onClick", "javascript:history.back(); return false;");
The web form has GridView with command button for editing the GridView rows.It has Update and Cancel buttons.

After clicking the command button(it will show  Update and cancel buttons) ,If I click the back button it is still staying in the same page.(It is showing the Update,Cancel view of the
page. It is not going to previous page.
Without clicking the Command Button if I click the back button it is going to previous page.

How to make it work.

Thanks.
0
Comment
Question by:KavyaVS
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 18

Accepted Solution

by:
Rajar Ahmed earned 2000 total points
ID: 39217875
history.back();
This works based on page referrer when u cause postback  then referrer will be updated to the current page and hence u stay on the same page .

Try this solution ,
http://www.devx.com/vb2themax/Tip/18842

Meeran03
0
 

Author Comment

by:KavyaVS
ID: 39242700
It is working.
Thanks
0
 

Author Closing Comment

by:KavyaVS
ID: 39242703
Thanks
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question