“不允许使用循环文件引用”使用PreviousPageType时 [英] "circular file references are not allowed" while using PreviousPageType

查看:158
本文介绍了“不允许使用循环文件引用”使用PreviousPageType时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的申请由于公司限制我们无法使用会话,查询字符串或cookie。我必须在response.redirect之后保留一个字符串到同一页面。更清楚的是,当用户已经在XYZ.aspx页面上并且同一用户通过单击导航菜单重定向到同一页面时,我想在使用菜单导航之前读取分配了值的字符串。



使用 PreviousPageType 指令尝试使用不允许循环文件引用例外。

有人可以建议一个approch来处理这个。



在XYZ.aspx页面中使用的PreviousPageType指令如下(哪个没用)

<%@ PreviousPageType VirtualPath =XYZ.aspx%>

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" %>

推荐答案

您的公司存在荒谬和无根据的限制。存储任何状态的唯一方法是从一个页面到另一个页面进行POST提交,重定向使用GET,而不是POST。重定向后,您无法存储状态。告诉你的公司,如果他们坚持这些愚蠢的限制你根本无法存储状态,许多任务根本无法完成。理想情况下也要寻找另一份工作:)
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 :)


:)感谢免费解决方案。
:) Thanks for the free solution.


这篇关于“不允许使用循环文件引用”使用PreviousPageType时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆