重定向到相应页面的标志 [英] Flag for Redirection to Respective Page

查看:72
本文介绍了重定向到相应页面的标志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!
我有一个Test.aspx网页,上面有两个下一步"和返回"按钮.我从多个页面重定向到此页面(Test.aspx).我想定义一个标志,当我单击后退"按钮时,该页面应重定向到相应页面.为此,我使用了会话,但没有成功.请指导我如何定义一个标志来应对这种情况.
谢谢

HI!
I have a web page Test.aspx having two button of next and back on it. I redirect to this page (Test.aspx) from multiple pages. I want to define a flag that when i click to back button this page shuld be redirected to the respective page. For this purpose, i had used session but it didn''t work out. Please guide me how can a define a flag to cope with situation like this.
Thanks

推荐答案

您可以使用querystring
将参数传递给页面 例如
you ca pass the parameters to the page using querystring
eg
Response.Redirect("Test.aspx?blnFlag=true", false);



并获取类似
的值



and retrieve the value like

if (Request.QueryString["blnFlag"] != null && Request.QueryString["blnFlag"].Equals("true"))
{
//Do whatever you want
}


我忘了提到一件事,我不允许在这里使用查询字符串.因此,我没有寻求该解决方案.还有其他不错的安全解决方案吗?
I forgot to mention one thing that i am not allowed to use query string here. So i didn''t go for that solution. Is there else pretty good secure solution?


这篇关于重定向到相应页面的标志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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