CheckboxList inside a wizard control

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.
 
H

Hillbilly

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.
 
A

Andy B

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.
 
H

Hillbilly

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.
 
A

Andy B

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.
 
H

Hillbilly

// 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
 
H

Hillbilly

// 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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top