hi,
Why are you trying like this
in the .aspx page
<div>
<div> Enter username: <asp:TextBox ID="txtUsername" runat="Server" /> </div>
<div> Enter Password: <asp:TextBox ID="txtPassword" runat="Server" /> </div>
<div> <asp:Button ID="btnLogin" Text="Login" runat="server" onclick=btnLogin_Click"/> </div>
</div>
add below code in .cs file
protected void btnLogin_Click(object sender, EventArgs e)
{
if(txtUsrname.Text !=String.empty && txtPassword.Text != string.empty)
{
// write your database code here
}
}
Blessy Baby
Digitalmesh Softech pvt Ltd
https://blessybaby.wordpress.com/
Akiii, if this helps please login to Mark As Answer. | Alert Moderator