Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
2
Answers
login screen shows object referencenot setaninstanceofobject
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
narasiman rao
11y
1.1k
1
Reply
protected void BtnLogin_Click(object sender, EventArgs e)
{
if (this.TxtUserName.Text.ToString().Trim() == "" | this.TxtPassword.Text.ToString().Trim() == "" )
{
Response.Write("<script>window.alert(' Invalid Entry !!! ')</script>");
return;
}
SQl = "select * from login where username='" + this.TxtUserName.Text.ToString().Trim();
SQl = SQl + "' and password='" + this.TxtPassword.Text.ToString().Trim();
SQl = SQl + "' and active<>'D'";
try
{
Dr = SCon.ReadSql(SQl);
if (Dr.HasRows==false)
{
Response.Write("<script>window.alert(' Record not found !!! ')</script>");
return;
}
Dr.Read();
}
catch (Exception e1)
{
Response.Write("<script>window.alert(' " + e1.Message.ToString() + " ')</script>");
}
}
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
i have the following error as follows
Date of birth and wedding date should not be the same.