TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
SUNIL GUTTA
NA
1k
394k
Username & pwd verification ?
Oct 10 2013 9:36 AM
Hi
Is there any way out to verify username and password using sql query to DB ..
Well actually i pre-requisite is i have say many columns i,e password and usernames ... so on
I used query like this
cmd = new SqlCommand("select username,password from studentform where username = " '+textbox1.text' and password= " '+textbox2.text ' " ,con);
con.Open();
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
Server.Transfer("studentafterlogin.aspx");
}
else
{
Response.Write("<script> alert('Invalid credentials')</script>");
}
In above in my command , The select statement NOT WORKING PROPERLY i am not getting anything to datareader EVEN i given correct credentials ?? Problem in query ??
Help it please ....
Reply
Answers (
4
)
grid view
Adrotator to rotate image using image control