Beispiel #1
0
 protected void Submit_Click(object sender, EventArgs e)
 {
     if (Page.IsValid)
     {
         ToDoItemData.AddItem(Description.Text, Category.SelectedValue);
         Description.Text = string.Empty;
     }
 }
Beispiel #2
0
 protected void Submit_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrWhiteSpace(TODODescription.Text))
     {
         ErrorMessage.Visible = false;
         ToDoItemData.AddItem(TODODescription.Text, int.Parse(TODOPriority.SelectedValue));
         ResetForm();
     }
     else
     {
         ErrorMessage.Visible = true;
     }
 }