protected void InsertRecord_Cancel() { //set the txtbox to empty TextBox txtID = (TextBox)fv_NewRecord.FindControl("txtID"); DropDownList ddlSite = (DropDownList)fv_NewRecord.FindControl("ddlSite"); DropDownList ddlSex = (DropDownList)fv_NewRecord.FindControl("ddlSex"); TextBox txtTime1a_agemos = (TextBox)fv_NewRecord.FindControl("txtTime1a_agemos"); TextBox txtFullScaleDQ = (TextBox)fv_NewRecord.FindControl("txtFullScaleDQ"); TextBox txtTime1a_date = (TextBox)fv_NewRecord.FindControl("txtTime1a_date"); TextBox txtAssignment_date = (TextBox)fv_NewRecord.FindControl("txtAssignment_date"); TextBox txtNotes = (TextBox)fv_NewRecord.FindControl("txtNotes"); txtID.Text = ""; ddlSite.SelectedIndex = 0; ddlSex.SelectedIndex = 0; txtTime1a_agemos.Text = ""; txtFullScaleDQ.Text = ""; txtTime1a_date.Text = ""; txtAssignment_date.Text = ""; txtNotes.Text = ""; UpdatePanel_insert.Update(); fv_NewRecord.Visible = false; btnShowInsertForm.Visible = true; btn_InsertRecord.Visible = false; btn_InsertRecord_Cancel.Visible = false; //Label lblError = (Label)Master.FindControl("lblInfoLog_Error"); lblError.Text = ""; }
protected void ShowInsertForm(object sender, EventArgs e) { fv_NewRecord.Visible = true; btnShowInsertForm.Visible = false; btn_InsertRecord.Visible = true; btn_InsertRecord_Cancel.Visible = true; UpdatePanel_insert.Update(); }