coding for login view and login name with out controls

Posted by reddysankark-13471 under ASP.NET on 3/1/2012 | Points: 10 | Views : 1295 | Status : [Member] | Replies : 1
i want to create login view and login name without using login view controls.soany body help me for this

sankarreddy


Responses

Posted by: Blessyjees on: 3/2/2012 [Member] Bronze | Points: 25

Up
0
Down
Hi,

Try this

in aspx page

 <div id="login_container"><table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-top:35px; color:#052F57;">

<tr>
<td colspan="4" align="center">
<asp:Label ID="lblMessage" runat="server" CssClass="error"></asp:Label>
</td>
</tr>
<tr>
<td width="30%">&nbsp;</td>
<td width="8%">&nbsp;</td>
<td width="53%">&nbsp;</td>
<td width="9%">&nbsp;</td>
</tr>
<tr>
<td height="29" align="right"><strong>User name</strong></td>
<td align="left">
<asp:RequiredFieldValidator ID="UsernameRequiredValidator" runat="server"
ControlToValidate="Username" ErrorMessage="*" SetFocusOnError="true"></asp:RequiredFieldValidator>
</td>
<td>
<asp:TextBox ID="Username" runat="server" TabIndex="1" MaxLength="20"></asp:TextBox>
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td height="47" align="right" valign="top"><strong>Password</strong></td>
<td align="left" valign="top"><asp:RequiredFieldValidator ID="PasswordRequiredValidator" runat="server"
ControlToValidate="Password" ErrorMessage="*" ToolTip="Enter Password" SetFocusOnError="true"></asp:RequiredFieldValidator></td>
<td valign="top"><asp:TextBox ID="Password" TextMode="Password" runat="server" TabIndex="2" MaxLength="20"></asp:TextBox></td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="3" align="right">
<asp:ImageButton ID="btnLogin" runat="server" SkinID="Login" TabIndex="3"
onclick="btnLogin_Click"/></td>
</tr>
</table>
</div>


in cs file


  protected void btnLogin_Click(object sender, ImageClickEventArgs e)

{

if (Page.IsValid)
{
//here write the code to pass username and password to database for authentication.
}
}


Blessy Baby
Digitalmesh Softech pvt Ltd
https://blessybaby.wordpress.com/

reddysankark-13471, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response