Results 1 to 2 of 2

Thread: checkbox

  1. #1
    Join Date
    Dec 1969

    Default checkbox

    Hello. I have a checkbox list that is databound with my page loads. I have a button click event...that is intended to capture the values selected in the checkbox list.<BR><BR>the problem is when ever the event fires the selected values are gone and this even doesn&#039;t pick up anything:<BR><BR>for (int i=0; i&#060;chk_categories.Items.Count; i++) <BR>{<BR>if (chk_categories.Items[i].Selected)<BR>Response.Write(chk_categories.Items[i].Text + "<BR>");<BR>}

  2. #2
    Join Date
    Dec 1969

    Default RE: checkbox

    Are you rebinding the checkboxlist on each postback?<BR><BR>Try wrapping your page load like this:<BR><BR>Sub Page_Load<BR>If Not IsPostBack Then<BR>BindCheckBoxList<BR>End If<BR>End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts