Error occured while updating table
try to update my table.but error occured like Incorrect syntax near '='. in executenonquery.fix it??msql.Open();
string query = "upadate tbl_Admission set AdmissionNumber='" + txt_mod_Adnum.Text + "',Name='"+txt_mod_Name.Text+"',FatherName='"+txt_mod_Fathername.Text+"',Presentaddress='"+txt_mod_preaddress.InnerText+"',Permanentaddress='"+txt_mod_peraddress.InnerText+"',mobile='"+txt_mod_mobile.Text+"',dob='"+txt_mod_resnum.Text+"',resnumber='"+txt_mod_resnum.Text+"',gender='"+gen+"' where AdmissionNumber='"+txt_mod_Adnum.Text+"'";
mcmd = new SqlCommand(query, msql);
mcmd.Connection = msql;
int count=mcmd.ExecuteNonQuery();
if (count > 0)
{
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Record Updated Successfully')", true);
}
else
{
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert('Record not updated')", true);
}
msql.Close();