Click here to Skip to main content
15,890,579 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I my application due to company restrictions we can not use sessions,query string or cookies. I have to retain a string after response.redirect to the same page. To be more clear, when the user is already on XYZ.aspx page and the same user redirects to the same page by clicking on navigation menu I want to read the string to which value is assigned before navigation using menu.

Tried using PreviousPageType directive which is giving "circular file references are not allowed" exception.
Can some one please suggest an approch to handle this.

In XYZ.aspx page the PreviousPageType directive used is below(Which did not worked)
<%@ PreviousPageType VirtualPath="XYZ.aspx" %>
Posted
Updated 15-Jun-15 21:29pm
v2
Comments
Sreekanth Mothukuru 16-Jun-15 9:47am    
Have you tried page viewstate why because you are redirecting to the same page!!?

Your company has ridiculous and unwarranted restrictions. The only way you can store any state is by doing POST submissions from one page to another, and redirect uses GET, not POST. There is no way for you to store state after a redirect. Tell your company that if they insist on these stupid restrictions you simply can't store state and many tasks simply can't be done. Ideally look for another job too :)
 
Share this answer
 
:) Thanks for the free solution.
 
Share this answer
 

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


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