protected void Button1_Click(object sender, EventArgs e) { try { Whitfieldcore wCore = new Whitfieldcore(); for (int i = 0; i < leftlist.Items.Count; i++) { if (leftlist.Items[i].Selected) { wCore.InsertRight(Convert.ToInt32(ViewState["twcProjNumber"].ToString()), leftlist.Items[i].Value); } } DisplayListBoxValues(); } catch (Exception ex) { Response.Write(ex.Message); } }