public void addBudgetClick(Object sender, EventArgs e) { DataAbstract DA = new DataAbstract(); int categoryID = Convert.ToInt32(CategorySelect.SelectedValue); //REAL ONE WILL USE INDEX OF DROP-DOWN? long accountNum = Convert.ToInt64(AccountList.SelectedValue); //uses the session to recieve the account double amount = Convert.ToDouble(BudgetAmtField.Text); //holds amount of the goal //CHECK LINE BELOW FOR PROPER VALUES DateTime endDate = Convert.ToDateTime(EndDate.Text.Replace('-', '/')); DateTime startDate = Convert.ToDateTime(StartDate.Text.Replace('-', '/')); //ADD CODE TO GET CHECKBOX VALUE int favorited = 0; //CheckBox CB = new CheckBox(); //REPLACE THIS WITH CHECKBOX VALUE!! //if (CB.Checked) favorited = 1; DA.addBudget(accountNum, categoryID, startDate, endDate, amount, favorited); //Reset form data after button click. Form data was resent upon refresh without this. Session["ViewState"] = null; Response.Redirect("Budget.aspx"); }