I created webform in which i have written insert query which was executing correctly. Now i have added one more field to my previous table i.e image.and i have added image column in my webform too. Before modifying this table and webform my insert query was working correctly.But after adding this it is giving me exception as "could not find column in databse", even though my table is showing that new column "image".and my insert query fails. What is the problem?please help.
this is my code-
SqlConnection conn = new SqlConnection("Data Source=SNEHAL-PC\\SNEHAL1;Initial Catalog=TEMPRUJU;Integrated Security=True");
SqlCommand cmd;
cmd = new SqlCommand("insert into login(name,midname,surname,username,password,contact,dob,email,address,occupation,ltype,image) values('" + txtfirst.Text + "','" + txtmid.Text + "','" + txtsur.Text + "','" + txtname.Text + "','" + txtpass.Text + "','" + txtcontact.Text + "','" + txtdob.Text + "','" + txtemail.Text + "','" + txtaddr.Text + "','" + txtocc.Text + "','" + typeButtonList1.SelectedValue + "','"+image1.ImageUrl+"')", conn);
cmd.ExecuteNonQuery();
Response.Redirect("WebForm1.aspx");