Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have two pages:
login.aspx and customer.aspx
when i login on login,aspx it goes to customer.aspx.
on customer.aspx is a gridview showing customer data.
on click of edit button in gridview it goes to edit mode.
but when i press the back button in browser it go back to login.aspx.

i want it to remain in customer.aspx in non edit(normal) mode.

i have the same problem with other pages on my site

thanx.
Posted
Updated 10-Oct-10 18:55pm
v2

You can check the session/cookies in the login page and redirect to the desired page if user already logged in.
 
Share this answer
 
Did you used AJAX in your customer.aspx? You didn't mentioned that.
If yes, then you can just show/hide panels based on View/Edit/etc modes.
I think you can show the Records in Gridview & you can have buttons in Grid for Add/Edit/Delete/View for showing the details in another panel which contains also button for navigating to Record list. All you need is AJAX.

You can disable back button by below javascript.
<script type="text/javascript">history.forward();</script>


Please let me know if you have any doubt.
 
Share this answer
 
Comments
Rohit from Delhi 11-Oct-10 3:30am    
i have used update panel
Rohit from Delhi 11-Oct-10 3:33am    
i want that the previous events of same page will be displayed on back click not the previous page
thatraja 11-Oct-10 3:38am    
Then use the javascript which i gave here to disable back button, always make navigation through page controls, for yours show/hide panels based on mode so write code in buttons for navigation. I hope my clues will be useful for you.
Rohit from Delhi 11-Oct-10 3:39am    
i used the same code but its not working
Rohit from Delhi 11-Oct-10 3:40am    
i want that the page will behave as normal page on browser's back button click

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900