How do I use a ASP.NET Login control without using a MembershipProvider? -
This is a branch
- If I do not have
subscription provider
So how do I use thislog in
control? - Am I properly understanding the use model?
- Do
login
control withoutsubscription provider
? - Just checking the username / password requires
the subscription provider
? - Is this your own
membership provider
with the same authentication argument?
In my case, I do not need the subscription provider
(I think) because my credential status is trivial (a user, a password).
I partially "future proof" is partly interested in my page and partly because I'm new and wondering how stuff works (I am full of every corner Learn about things by running the speed :)
You can simply drop ASP: Grab the login credentials of login control in your page, in the code behind it, login control.
In the authentication event, check the username / password entered by the user. Username / Password login control has properties (login username, login password).
If the username / password is correct, then just set the certified asset to the corrected property on the right.
No subscription provider required.
In the former ASPX page ..
& lt; Asp: login id = "login to run" run = "server" destination page = "youAreIn.aspx" & gt; & Lt; / Asp: Login & gt;
In the back-code
Authenticate all private people (as an object-by-sender, the same as the system .Yi.Visit WebControl. EnterNetTechnetEventArge) LoginCtl.Confirm if LoginCtrl.UserName = "Hello" and also LoginCustomer = "Hello" then e.authorized = true end if
c #
<0> Zero MyLogin_Authenticate (object sender, AuthenticateEventArgs e) {if (user name == "hello" & amp; password == "hello") e.authorized = true; }
Comments
Post a Comment