Beispiel #1
0
 protected void Save(object sender, EventArgs e)
 {
     try
     {
         objML_StudentProfile.ID       = txtFirstName.Text != "" ? txtFirstName.Text : null;
         objML_StudentProfile.EmailID  = txtEmail.Text != "" ? txtEmail.Text : null;
         objML_StudentProfile.PhoneNo  = txtPhoneNo.Text != "" ? txtPhoneNo.Text : null;
         objML_StudentProfile.ModifyBy = Session["UserName"].ToString();
         int x = objBL_StudentProfile.BL_UpdStudentInfo(objML_StudentProfile);
         if (x == 1)
         {
             ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert('Update Saved.')", true);
         }
     }
     catch (Exception ex)
     {
         ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert('" + ex.Message.ToString() + "')", true);
     }
 }