protected void MedicalServiceDetailsFormView_ItemUpdating(object sender, FormViewUpdateEventArgs e) { // set the MedicalServiceGroupID // get the control from the formview var groupNameControl = (DropDownList)MedicalServiceDetailsFormView.FindControl("MedicalServiceGroupNameDropdownList"); // set the value to be updated e.NewValues["MedicalServiceGroupID"] = groupNameControl.SelectedValue; }
protected void ClearForm() { ((TextBox)MedicalServiceDetailsFormView.FindControl("NameTextBox")).Text = ""; ((TextBox)MedicalServiceDetailsFormView.FindControl("PriceTextBox")).Text = ""; }