更改密码屏幕必须基于以前的页面工作 [英] Change password screen have to work based on previous pages
问题描述
大家好,
我正在更改密码屏幕,此页面将重定向两页。
1.forgot密码屏幕
2.如果首次登录则
它将从登录页面重定向
我的需求是
如果更改密码屏幕从忘记密码屏幕重定向意味着,我必须隐藏旧密码和它的验证
如果从登录(强制更改密码)屏幕重定向的更改密码屏幕意味着,我必须显示旧密码及其验证
给我任何想法请
提前致谢
您可以使用QueryString
来完成此任务。
添加QueryString
重定向页面时。
例如:
// 如果重定向忘记密码
Response.Redirect( 〜/ ChangePassword.aspx?rd = fp 跨度>); // 更好地加密查询字符串
// 如果从登录密码重定向
Response.Redirect( 〜/ RD为ChangePassword.aspx = LG跨度>);
// 然后在更改密码页面检查查询字符串
If(Request.QueryString [ rd]。ToString()== fp)
{
// 从忘记密码重定向
// 做你的事情
}
else
{
// 从登录密码重定向
// 做你的事情
}
您可以通过设置来做同样的事情会话
变量。
祝你好运。
您是否尝试过上一页技术,
你可以找到更多的这里 [ ^ ]
Hi all,
I am doing change password screen, this page will be redirected for two pages.
1.forgot password screen
2.if firsttime login then
it will be redirected from login page
my needs is
if the change password screen redirected from forgot password screen means, i have to hide the old password and its validation
if the change password screen redirected from login(force changepassword) screen means, i have to show the old password and its validation
give me any idea please
Thanks in advance
You can useQueryString
to do this task.
Add aQueryString
when you redirect the page.
Eg :
//If redirecting from forgot password Response.Redirect("~/ChangePassword.aspx?rd=fp"); //better encrypt the querystring //If redirecting from login password Response.Redirect("~/ChangePassword.aspx?rd=lg"); //And then on change password page Check the query string If(Request.QueryString["rd"].ToString() == "fp") { //redirected from forgot password //do your things } else { //redirected from login password //do your things }
You can do same things by setting aSession
variable.
Good luck.
have you tried with Previous Page technique,
you can find out more Here[^]
这篇关于更改密码屏幕必须基于以前的页面工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!