Buzzmaster
09-22-2007, 03:52 AM
Typically, you will be handling the event OnAuthenticte to "grab" what the user inputted for the LoginName.
This would be an example of your login control on the asp page.
<asp:Login ID="Login1" runat="server" OnAuthenticate="Login1_Authenticate"></asp:Login>
If you notice, the important thing to take away from this small bit of code is the OnAuthenticate attribute of the asp:Login control.
In the code behind, or nested in the <script> if you are not using code behinds, you will need to create a method to "Handle" the onAuthenticate event like so;
C#
[quote]
protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
{
string user = Login1.UserName;
}</CODE>
VB
[quote]
Protected Sub Login1_Authenticate(ByVal sender As Object, ByVal e As AuthenticateEventArgs)
Dim user As String = Login1.UserName
End Sub </CODE>
As you can see the "UserName" property of the Login control will give you the user name that the user inputted.
BZ
This would be an example of your login control on the asp page.
<asp:Login ID="Login1" runat="server" OnAuthenticate="Login1_Authenticate"></asp:Login>
If you notice, the important thing to take away from this small bit of code is the OnAuthenticate attribute of the asp:Login control.
In the code behind, or nested in the <script> if you are not using code behinds, you will need to create a method to "Handle" the onAuthenticate event like so;
C#
[quote]
protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
{
string user = Login1.UserName;
}</CODE>
VB
[quote]
Protected Sub Login1_Authenticate(ByVal sender As Object, ByVal e As AuthenticateEventArgs)
Dim user As String = Login1.UserName
End Sub </CODE>
As you can see the "UserName" property of the Login control will give you the user name that the user inputted.
BZ