protected void btnsave_Click(object sender, EventArgs e) { if (Page.IsValid) { BusinessObjects.User user = new BusinessObjects.User(); long ret = -1; user.FirstName = txtfirstName.Text; user.LastName = txtlastname.Text; user.EmailId = txtemailid.Text; user.MobileNo = txtmobileno.Text; user.Birthdate = Convert.ToDateTime(txtbirthdate.Text); user.Gender = rbgender.SelectedItem.Text; user.UserId = Convert.ToInt64(Session["uid"]); user.UserTypeId = ddlusertype.SelectedValue; ret = objuser.Updateuser(user); if (ret > 0) { Response.Redirect("#"); } else { lblmsg.Text = "Profile update failed, please try after sometime"; } } }