重定向到登录模式弹出窗口,而不是表单身份验证中的登录页面 [英] Redirect to login modal popup instead of login page in Form Authentication

查看:116
本文介绍了重定向到登录模式弹出窗口,而不是表单身份验证中的登录页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我的网站上有免费链接需要登录的链接.即使用户未登录,也会打开免费链接.但是,如果需要登录的链接,请重定向到标记中 Web.Config 中指定的 login.aspx . .

我想要某种方法来覆盖此问题,并仅对那些需要登录的链接(不包括免费链接)显示带有登录控制的Ajax模态弹出窗口(Ajax扩展器工具包).
是的,我正在将Master Page用于Web应用程序.

请帮助我实现此功能. :sigh:

谢谢,
Amit

Hi,

I have my website in which there are free links and links that require login. Free links open even if the user is not logged in. But in case of links that require login, redirect to login.aspx specified in Web.Config in loginURL tag.

I want some way to override this and show Ajax modal popup (Ajax extender toolkit) with login control for only those links that require login (not for the free links).

And yes, I am using Master Page for the web application.

Please help me in achieving this functionality. :sigh:

Thanks,
Amit

推荐答案

我不理解在您的上下文中覆盖的含义.
每当任何链接需要登录时,您只需要检查该页面的Pageload,如果用户未登录,则在modelpopup中打开登录页面.您可以在modelpopup中使用iframe来实现.用户身份验证后,您可以将用户重定向到适当的页面.
I dont understand the meaning of overriding in your context.
Whenever any link needs login, you just need to check on Pageload of that page, if the user is not loggedin, the open the login page in modelpopup. You can achieve this using iframe in modelpopup. Once user authenticated, you can redirect the user to appropriate page.


我自己开发了问题的答案.我在代码项目中为此@ @a发表了一篇文章,网址为重定向到登录模式弹出窗口,而不是表单身份验证 [^ ]
I developed the answer of my question myself. I posted an article on code project for this @ Redirect to login modal popup instead of login page in Form Authentication[^]


这篇关于重定向到登录模式弹出窗口,而不是表单身份验证中的登录页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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