views:

31

answers:

0

Hi,

I've been stuck with this problem where there are 3 steps in an asp wizard control. The first step has a radiobutton (yes and no) and based on the radio button input chosen by the user, i would need to hide or show a label in the second wizardstep.

Example:

Step 1: Choose 1 among the two options: Yes No (radStep1)

Step 2: if the radiobutton option in the previous step was yes.. then display a label(lblStep2) in this step.. Else hide the label.

I've been handling this through the jquery as i want the functionality in the aspx page itself...

The jquery code goes like this...

$("#<%=radStep1.ClientID %> input").click(function() {
if($("#<%= radStep1.ClientID %> input").index(this) == 0)
{
     $("#<%=lblStep2.ClientID %>").show();
}
else if($("#<%= radStep1.ClientID %> input").index(this) == 1)
{
    $("#<%=lblStep2.ClientID %>").hide();
}

However, in both the cases, the label is getting displayed.. Could you please help me out if there is anything that i'm missing?

I'm guessing that the label is getting hidden at first and then getting shown again once i click on the next button...

Thanks a ton in advance....