开发者

Using Sessions in an ASP.NET 4.0 Log-In Control

开发者 https://www.devze.com 2023-04-08 10:16 出处:网络
I\'m currently developing a website using Visual Studio 2010. As you all might know, creating a new website here automatically adds an Account folder which contains webpages like Login.aspx, etc. I am

I'm currently developing a website using Visual Studio 2010. As you all might know, creating a new website here automatically adds an Account folder which contains webpages like Login.aspx, etc. I am implementing this Login.aspx which contains the ASP.NET Login control. It's now functioning the way it should but I have a few concerns.

Before, I used to create my own UI for the log-in so managing sessions is not a problem to me. But since i'm currently using the Login.aspx which has a CS file almost empty, i don't have an idea where I can start implementing my session. Meaning to say, I don't know how to check programatically if the user has been successfully logged in so I can start implementing my session.

I 开发者_JAVA技巧would very much appreciate any pointer regarding this matter.

Thanks in advance. :)


You could subscribe for the Authenticate event and perform some custom authentication logic. Also you may take a look at the following article.


There are events associate with ASP.NET Login Control that you can use to create session like OnLoggingIn. Moreover you can find more about user validation from here Validating User Credentials Against the Membership

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号