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
Manj N
NA
148
90.5k
i am getting error as nullReferenceException
Jul 31 2013 4:58 AM
i am getting error as Object reference not set to an instance of an object.
NullReferenceException was unhandled by user..
public partial class _Default : System.Web.UI.Page
{
SqlConnection MyConnection = new SqlConnection(ConfigurationManager.AppSettings["ConnectionString"].ToString());
SqlCommand MyCommand= new SqlCommand();
string query;
protected void Page_Load(object sender, EventArgs e)
{
}
protected void submit_Click(object sender, EventArgs e)
{
query="INSERT INTO tablem (name,password) VALUES (" + name +"," + password +")";
try
{
}
catch (NullReferenceException)
{
Console.WriteLine("error ");
}
}
}
Reply
Answers (
19
)
HOW TO GET NAME IN TEXT CHANGED
how to delete files in folder