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
Aman Jen
NA
141
40.5k
Update password Not working
Sep 6 2013 12:53 AM
cn.Open();
cmd.Connection = cn;
cmd.CommandText = "Select * From LoginUser Where User_Id= '" + TB_User.Text + "' And Pass_W='" + TB_Pass.Text + "'";
SqlDataReader dr = default(SqlDataReader);
dr = cmd.ExecuteReader();
if (dr.HasRows) {
dr.Read();
if ((dr.Item("User_Id").ToString == TB_User.Text) & (dr.Item("Pass_W").ToString == TB_Pass.Text)) {
dr.Close();
if (TB_New_P.Text == TB_Con_P.Text) {
cmd.CommandText = "Update LoginUser Set Pass_W='" + TB_New_P.Text + "' Where User_Id='" + TB_User.Text + "'";
cmd.ExecuteNonQuery();
Interaction.MsgBox("Password Update Sucess");
} else {
Interaction.MsgBox("Password Didnot match");
}
}
}
In VB we have dr.item stuff...so therein its woking fine...
but not in C#
Plz help
Reply
Answers (
1
)
Collections and generics in c#
How to get Multiple values in controler from MultiSelect Dro