コード例 #1
0
 protected void clear_Click(object sender, EventArgs e)
 {
     FullName.Text     = "";
     EmailAddress.Text = "";
     PhoneNumber.Text  = "";
     FullOrPartTime.ClearSelection();
     Jobs.ClearSelection();
 }
コード例 #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();
 }
コード例 #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
 }
コード例 #4
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();
 }
コード例 #5
0
 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();
 }
コード例 #6
0
 protected void Clear_Click(object sender, EventArgs e)
 {
     FullName.Text     = "";
     EmailAddress.Text = "";
     PhoneNumber.Text  = "";
     //Two ways of clearing out selection lists
     FullOrPartTime.SelectedIndex = -1;
     FullOrPartTime.ClearSelection();
     Jobs.SelectedIndex = -1;
 }