public void saveData(object sender, EventArgs e) { if (IsValid) { //TypeBO aux = (TypeBO)typeDropDownList.SelectedItem; studentBLL.Create(int.Parse(typeDropDownList.SelectedItem.Value.ToString()), name.Text, char.Parse(gender.SelectedValue)); Response.Redirect("index.aspx"); } }