protected void btnsave_Click(object sender, EventArgs e) { _FacultyMaster _fclt = new _FacultyMaster(); _fclt.Fct_ID = Convert.ToInt32(lblfacultyid.Text.Trim()); _fclt.Name = txtaddname.Text.Trim(); _fclt.Schl_Name = txtaddschool.Text.Trim(); _fclt.Res_Add = txtaddaddress.Text.Trim(); _fclt.Pincode = txtaddpincode.Text.Trim(); _fclt.Contact = txtaddcontact.Text.Trim(); _fclt.Res_No = txtaddresno.Text.Trim(); _fclt.Qualification = txtaddqual.Text.Trim(); _fclt.Tch_Exp = txtaddtchexp.Text.Trim(); _fclt.Spec_Sub = txtaddsplsub.Text.Trim(); _fclt.Sub_Intrs_Wrt = txtaddints.Text.Trim(); //_fclt.Prvs_Exp_Wrt = Convert.ToBoolean(rdoyesno.Text.Trim()); if (rdoyesno.Items[0].Selected == true) { _fclt.Prvs_Exp_Wrt = "yes"; } else if (rdoyesno.Items[1].Selected == true) { _fclt.Prvs_Exp_Wrt = "No"; } _fclt.Pls_Mnt_bk_Pub = txtaddplsbooks.Text.Trim(); _fclt.SDZ = Convert.ToInt32(ddlSDZone.SelectedValue.ToString()); _fclt.SZ = Convert.ToInt32(DDLSuperZone.SelectedValue.ToString()); _fclt.Z = Convert.ToInt32(DDLZone.SelectedValue.ToString()); _fclt.Fy = Convert.ToInt32(strFY); try { _fclt.Save(); MessageBox("Data Saved Successfully."); Clear(); } catch { throw; } }