private void button4_Click(object sender, EventArgs e) { Roll_comboBox.Text = "Select Roll No."; werror.Clear(); Roll_comboBox.Focus(); name_textview.Text = ""; class_textview.Text = ""; Report_textbox.Clear(); Technical_textbox.Clear(); Presentation_textbox.Clear(); total_textview.Text = ""; Remarks_textbox.Text = ""; werror.SetError(this.Report_textbox, ""); werror.SetError(this.Technical_textbox, ""); werror.SetError(this.Presentation_textbox, ""); }
private void Technical_textbox_Leave(object sender, EventArgs e) { technical_marks = Technical_textbox.Text; double tm; Double.TryParse(technical_marks, out tm); if (tm < 0 || tm > 10) { werror.SetError(this.Technical_textbox, "Only marks Between 0 to 10 allowed"); Technical_textbox.Focus(); } else { werror.SetError(this.Technical_textbox, ""); werror.Clear(); } }