Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I want to use a customised asp.net 2.0 login control. Basically my username and password and submit imagebutton are built into my site navigation bar.

 

Is there anyway to do somthing like this when my submit button is pressed.

 

Private Sub btnSubmit_Click handles btnSubmit.Click

 

Dim loginControl as New Web.UI.LoginControl

loginControl.username = txtMyUsername.text

loginControl.password = txtMyPassword.text

loginControl.DoSubmit

End Sub

 

Thanks

  • 2 weeks later...
  • Administrators
Posted

If you are trying to log a person on programatically it might be easier to use the Membership class itself. Something like

 

If (Membership.ValidateUser (txtMyUsername.text, txtMyPassword.text)) Then

     FormsAuthentication.RedirectFromLoginPage (txtMyUsername.text, false)
end if

should be a starting point.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...