protected void clear_Click(object sender, EventArgs e)
 {
     FullName.Text     = "";
     EmailAddress.Text = "";
     PhoneNumber.Text  = "";
     FullOrPartTime.ClearSelection();
     Jobs.ClearSelection();
 }
Exemplo n.º 2
0
 protected void clear_Click(object sender, EventArgs e)
 {
     FullName.Text     = "";
     EmailAddress.Text = "";
     PhoneNumber.Text  = "";
     FullOrPartTime.ClearSelection(); //or we can do it this way: FullOrPartTime.SelectedIndex = -1; which means set it to 'nothing' since index starts at 0, this is the old way
     Jobs.ClearSelection();
 }
Exemplo n.º 3
0
 protected void clear_Click(object sender, EventArgs e)
 {
     FullName.Text     = "";
     EmailAddress.Text = "";
     PhoneNumber.Text  = "";
     FullOrPartTime.ClearSelection();
     Jobs.ClearSelection(); // clear selection effectively sets the array position to -1
 }
Exemplo n.º 4
0
 protected void Clear_Click1(object sender, EventArgs e)
 {
     FullName.Text                = "";
     EmailAddress.Text            = "";
     PhoneNumber.Text             = "";
     FullOrPartTime.SelectedIndex = -1; //manually reset the radiobuttonlist
     Jobs.ClearSelection();             //a method which resets a list (checkbox or radio)
 }
Exemplo n.º 5
0
 protected void Clear_Click(object sender, EventArgs e)
 {
     FullName.Text                = "";
     EmailAddress.Text            = "";
     Phone.Text                   = "";
     FullOrPartTime.SelectedIndex = -1; //manual reset the radiobuttonlist
     Jobs.ClearSelection();             //a method which reset a list (CheckBoxList)
 }
 protected void Clear_Click(object sender, EventArgs e)
 {
     FullName.Text                = "";
     EmailAddress.Text            = "";
     PhoneNumber.Text             = "";
     FullOrPartTime.SelectedIndex = -1;
     //FullOrPartTime.ClearSelection(); clear the radio button list
     Jobs.ClearSelection(); //clears the checkbox list
 }
Exemplo n.º 7
0
 protected void Clear_Click(object sender, EventArgs e)
 {
     FullName.Text                = "";
     EmailAddress.Text            = "";
     Phone.Text                   = "";
     FullOrPartTime.SelectedIndex = -1; //Manually reset the RadioButtonList
     Jobs.ClearSelection();             //A method which resets a list (CheckboxList)
     //Both ways are ok to use
 }
Exemplo n.º 8
0
 protected void Clear_Click(object sender, EventArgs e)
 {
     //remove any data within a control
     FullName.Text     = "";
     EmailAddress.Text = "";
     PhoneNumber.Text  = "";
     FullOrPartTime.ClearSelection();
     Jobs.ClearSelection();
 }
 protected void Clear_Click(object sender, EventArgs e)
 {
     FullName.Text     = "";
     EmailAddress.Text = "";
     PhoneNumber.Text  = "";
     //FullOrPartTime.SelectedIndex = -1; either or will work
     FullOrPartTime.ClearSelection();
     Jobs.ClearSelection();
 }
Exemplo n.º 10
0
 protected void Clear_Click(object sender, EventArgs e)
 {
     FullName.Text                = "";
     EmailAddress.Text            = "";
     PhoneNumber.Text             = "";
     FullOrPartTime.SelectedIndex = -1;
     //FullOrPartTime.ClearSelection(); Alternetive way
     Jobs.ClearSelection();
 }
Exemplo n.º 11
0
 protected void Clear_Click(object sender, EventArgs e)
 {
     //assuming for this example all data is valid
     FullName.Text                = "";
     EmailAddress.Text            = "";
     PhoneNumber.Text             = "";
     FullOrPartTime.SelectedIndex = -1;
     Jobs.ClearSelection();
 }
Exemplo n.º 12
0
 protected void Clear_Click(object sender, EventArgs e)
 {
     FullName.Text     = "";
     EmailAddress.Text = "";
     Phone.Text        = "";
     //for Lists there are a couple of ways to reset
     //A) manually reset the control selectIndex to -1
     FullOrPartTime.SelectedIndex = -1;
     //B) use a control method to reset
     Jobs.ClearSelection();
 }
Exemplo n.º 13
0
 protected void Clear_Click(object sender, EventArgs e)
 {
     FullName.Text                = "";
     EmailAddress.Text            = "";
     PhoneNumber.Text             = "";
     FullOrPartTime.SelectedIndex = -1; //Invalid so it prevents anything from turning on. Or use:
     //FullOrPartTime.ClearSelection();
     //Jobs.SelectedIndex = -1;
     Jobs.ClearSelection();
     JobApplicantList.DataSource = null;
     JobApplicantList.DataBind();
 }
Exemplo n.º 14
0
        protected void Clear_Click(object sender, EventArgs e)
        {
            FullName.Text                = "";
            EmailAddress.Text            = "";
            PhoneNumber.Text             = "";
            FullOrPartTime.SelectedIndex = -1;
            // or FullOrPartTime.ClearSelection();
            // Jobs.SelectedIndex = -1;
            Jobs.ClearSelection();

            JobApplicantList.DataSource = null;
            JobApplicantList.DataBind();
        }
        protected void Clear_Click(object sender, EventArgs e)
        {
            //empty all textboxes and remove RadioButton and Checkbox choices
            FullName.Text     = "";
            EmailAddress.Text = "";
            PhoneNumber.Text  = "";

            //one technique in emptying a list is to set the index to -1, it's a non-existing index number
            //the second technique is to use a method called .ClearSelection()
            FullorPartTime.SelectedIndex = -1;
            Jobs.ClearSelection();
            MessageLabel.Text = "";
        }