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 using Session
Sep 3 2013 2:03 PM
Hi, I am trying to update db using session, but unable to do it..below is my code..redirect is working fine but I have added update on second page and to update using session but its not working ...
string t = Session["s"].ToString();
cn.Open();
cmd.Connection = cn;
cmd.CommandText = "Update Labtest_Table set Name='" + tbName.Text + "', Desgn='" + tbDesg.Text + "', Cata='" + tbCat.Text + "' where ID = @ID2";
cmd.Parameters.AddWithValue("@ID2",t);
int row = cmd.ExecuteNonQuery();
cn.Close();
tbName.Text = "";
tbDesg.Text = "";
tbCat.Text = "";
plz help....
Reply
Answers (
8
)
how to generate database with data sql script using c# code
Object Data Type