Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can you remove the table-tags in CreateUserWizard control

How can I use the CreateUserWizard control without having it render html tables?

I've customized the layout of the CreateUserWizard, and I'm using css to style it. My button is too far away from my form, due to the <table> tags asp.net is rendering by default.

<table cellspacing="0" cellpadding="0" id="cphContent_CreateUserWizard1" style="border-collapse: collapse; ">
    <tbody>
        <tr style="height: 100%; ">
            <td>
                <table cellspacing="0" cellpadding="0" style="height: 100%; width: 100%; border-collapse: collapse; ">
                    <tbody>
                        <tr>
                            <td style="height: 100%; width: 100%; ">
                                <fieldset>
                                    ...
                                </fieldset>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </td>
        </tr>
    </tbody>
</table>
like image 298
GenericUser Avatar asked Dec 06 '25 12:12

GenericUser


1 Answers

The CreateUserWizard doesn't have the RenderOuterTable property, but you can remove the table by using a LayoutTemplate and PlaceHolders (just like the ListView control).

This is an example:

<asp:CreateUserWizard runat="server" ActiveStepIndex="1"> 
  <LayoutTemplate> 
    <asp:PlaceHolder ID="WizardStepPlaceHolder" runat="server" />
    <asp:PlaceHolder ID="navigationPlaceHolder" runat="server" />
  </LayoutTemplate> 

  <HeaderTemplate>
    Header 
  </HeaderTemplate> 

  <StepNavigationTemplate>
    <asp:LinkButton runat="server" CausesValidation="False" CommandName="MovePrevious" Text="Previous" ID="StepPreviousButton">Previous</asp:LinkButton>
    <asp:LinkButton ID="NextLinkButton" runat="server" CommandName="MoveNext">Next</asp:LinkButton>
  </StepNavigationTemplate>

  <WizardSteps> 
    <asp:CreateUserWizardStep runat="server"> 
      <ContentTemplate> 
      </ContentTemplate> 
    </asp:CreateUserWizardStep> 

    <asp:CompleteWizardStep runat="server"> 
      <ContentTemplate> 
      </ContentTemplate> 
    </asp:CreateUserWizardStep> 
  </WizardSteps> 
</asp:CreateUserWizard> 
like image 194
Tom Jansen Avatar answered Dec 08 '25 04:12

Tom Jansen