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
aditya immadi
NA
205
71.6k
Object Reference not set to an Instance of an Object.Error
Sep 17 2013 1:44 PM
string constring = ConfigurationManager.ConnectionStrings["conn"].ConnectionString;
SqlCommand cmd = new SqlCommand();
SqlConnection conn = new SqlConnection(constring);
cmd.Connection = conn;
conn.Open();
cmd.CommandText = "sp_insert_data";
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@Name",Session["nameforlogin"].ToString());
cmd.Parameters.AddWithValue("@decription", txtdesr.Text);
cmd.Parameters.AddWithValue("@url", txturl.Text);
SqlDataReader dr = cmd.ExecuteReader();
conn.Close();
Hai all,
i want to insert "name"(user can't enter his name in this page we need to retrieve from sessions).at the time i have this error Object reference not set to an instance of an object
how can i overome this
Thanks and Regards
Reply
Answers (
3
)
WPF Memomy Management - Garbage Collection
Retrieving id and Name for Already Login User using Sessions