Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Back button is not working properly

Posted on 2013-06-03
Medium Priority
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.

Question by:KavyaVS
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
LVL 18

Accepted Solution

Rajar Ahmed earned 2000 total points
ID: 39217875
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 ,


Author Comment

ID: 39242700
It is working.

Author Closing Comment

ID: 39242703

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

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…
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
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

604 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