登录后如何保持同一页面? [英] how to remain on same page after login?

查看:99
本文介绍了登录后如何保持同一页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在masterpage中创建一个简单的登录。我希望在登录时保持在同一页面上。

如何在登录asp.net后保持在同一页面上?

我使用会话,但我不想使用身份验证。

我不知道重定向到哪个页面(哪个地址)?

I create a simple login in masterpage.I want to remain on same page when login is occurred.
how to remain on same page after login in asp.net?
I use session but I dont want to use authentication.
I dont know redirect to which page(which address)?

推荐答案

向我们展示一些代码,以便我们可以看到你在做什么。



无论如何,一旦经过验证,我想你可以简单地 Server.Execute(thispage )。您需要一些方法来检测用户现在是否已登录以显示特定内容(可能在 PreInit 事件中执行此操作(还有其他方法可以执行此操作)这也是)。



您是否只是想在验证后隐藏登录控件?



除非你有开发自定义身份验证的压倒一切的需求,为什么不只是使用MS提供的东西,然后像RyanDev建议的那样做?
Show us some code so we can see what you are doing.

Anyway, once validated I suppose you could simply Server.Execute("thispage"). You would need some method to detect that the user is now logged in so as to display specific content (perhaps something in the PreInit event to do that (there are other ways to do this as well).

Are you simply trying to hide the login controls once validated?

Unless you have an overriding need to develop custom authentication why not just use what MS provides and then do as RyanDev suggests?


这篇关于登录后如何保持同一页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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