CheckboxList inside a wizard control

  • Thread starter Thread starter Andy B
  • Start date Start date
A

Andy B

I have a CheckboxList inside a wizard control. It is in Step1. When I click
the next button I want to check for any selected items and then list them in
step2. In the case of no selected items, say that there are no selected
items. I have tried just about anything I can think of but for some reason
can't get the state of any of the selected items. Any idea how I can try and
deal with this? I put all of the code to check for selected items in the
Wizard_NextButtonClick event.
 
The Wizard requires a lot of study Andy. Go to the documentation and review
the event handlers this control supports. You want to use the
OnActiveStepChanged event handler.
 
Hi.

I have the following code in side the ActiveStepChanged event And I still
get a blank string. It is supposed to get the text and value of the selected
items and show them in the label control on the next step. Any idea what
might be going wrong here? It doesn't seem to work anywhere I put it. I saw
on a forum thread that the checkboxList has problems with postbacks when it
is bound to anything other than static items or directly to a database
table. Could this be the problem? I am using linq to sql for my datasources.
 
I'd try writing the HTML control(s) myself using runat="server" to work
around what may be a buggy ASP.NET Web Server control.
 
What do you mean by this?
Hillbilly said:
I'd try writing the HTML control(s) myself using runat="server" to work
around what may be a buggy ASP.NET Web Server control.
 
// create the HTML Control yourself
<input type="checkbox" id="checkbox1" value="foo" runat="server" />

// learn how to reference and use the HTML Control
// google
HtmlGenericControl
 
// I'm suggesting you create the HTML Control yourself
<input type="checkbox" id="checkbox1" value="foo" runat="server" />

// learn how to reference and use the HTML Control
// google
HtmlGenericControl

I'm fairly certain we can modify the properties of a control in a step
within the OnActiveStep event handler. You can test this amd learn to use
the OnActiveStep by changing the properties of a label that will be
displayed in the step the Wizard is moving to.
 
Back
Top