protected void btnEditOption_Click(object sender, EventArgs e) { if (IsValid) { Option opti = new Option(); opti.ID = Convert.ToInt32(drpChooseOption.SelectedValue); opti.Name = txtOptionNewName.Text; OptionHandler opt = new OptionHandler(); var userId = Convert.ToInt32(Session[sessionNames.userID_Karbar]); opt.UpdateOption(opti, userId); BindData(); txtOptionNewName.Text = ""; } }