有没有办法在创建用户向导中删除外部表?

时间:2015-11-30 22:11:57

标签: html asp.net wizard

在Visual Studio中使用“创建用户向导”时,将在运行网站时创建表。编辑了创建用户步骤,并删除了所有表标记。

<asp:CreateUserWizard ID="CreateUserWizard1" runat="server">
                <WizardSteps>
                    <asp:CreateUserWizardStep ID="CreateUserWizardStep1"   runat="server">
                        <ContentTemplate>

                                        <asp:Label runat="server" AssociatedControlID="UserName" ID="UserNameLabel">User Name:</asp:Label>

                                        <asp:TextBox runat="server" ID="UserName"></asp:TextBox>
                                        <asp:RequiredFieldValidator runat="server" ControlToValidate="UserName" ErrorMessage="User Name is required." ValidationGroup="CreateUserWizard1" ToolTip="User Name is required." ID="UserNameRequired">*</asp:RequiredFieldValidator>

                                        <asp:Label runat="server" AssociatedControlID="Password" ID="PasswordLabel">Password:</asp:Label>

                                        <asp:TextBox runat="server" TextMode="Password" ID="Password"></asp:TextBox>
                                        <asp:RequiredFieldValidator runat="server" ControlToValidate="Password" ErrorMessage="Password is required." ValidationGroup="CreateUserWizard1" ToolTip="Password is required." ID="PasswordRequired">*</asp:RequiredFieldValidator>

                                        <asp:Label runat="server" AssociatedControlID="ConfirmPassword" ID="ConfirmPasswordLabel">Confirm Password:</asp:Label>

                                        <asp:TextBox runat="server" TextMode="Password" ID="ConfirmPassword"></asp:TextBox>
                                        <asp:RequiredFieldValidator runat="server" ControlToValidate="ConfirmPassword" ErrorMessage="Confirm Password is required." ValidationGroup="CreateUserWizard1" ToolTip="Confirm Password is required." ID="ConfirmPasswordRequired">*</asp:RequiredFieldValidator>

                                        <asp:Label runat="server" AssociatedControlID="Email" ID="EmailLabel">E-mail:</asp:Label>

                                        <asp:TextBox runat="server" ID="Email"></asp:TextBox>
                                        <asp:RequiredFieldValidator runat="server" ControlToValidate="Email" ErrorMessage="E-mail is required." ValidationGroup="CreateUserWizard1" ToolTip="E-mail is required." ID="EmailRequired">*</asp:RequiredFieldValidator>

                                        <asp:Label runat="server" AssociatedControlID="Question" ID="QuestionLabel">Security Question:</asp:Label>

                                        <asp:TextBox runat="server" ID="Question"></asp:TextBox>
                                        <asp:RequiredFieldValidator runat="server" ControlToValidate="Question" ErrorMessage="Security question is required." ValidationGroup="CreateUserWizard1" ToolTip="Security question is required." ID="QuestionRequired">*</asp:RequiredFieldValidator>

                                        <asp:Label runat="server" AssociatedControlID="Answer" ID="AnswerLabel">Security Answer:</asp:Label>

                                        <asp:TextBox runat="server" ID="Answer"></asp:TextBox>
                                        <asp:RequiredFieldValidator runat="server" ControlToValidate="Answer" ErrorMessage="Security answer is required." ValidationGroup="CreateUserWizard1" ToolTip="Security answer is required." ID="AnswerRequired">*</asp:RequiredFieldValidator>

                                        <asp:CompareValidator runat="server" ControlToCompare="Password" ControlToValidate="ConfirmPassword" ErrorMessage="The Password and Confirmation Password must match." Display="Dynamic" ValidationGroup="CreateUserWizard1" ID="PasswordCompare"></asp:CompareValidator>

                                        <asp:Literal runat="server" ID="ErrorMessage" EnableViewState="False"></asp:Literal>

                        </ContentTemplate>
                    </asp:CreateUserWizardStep>
                    <asp:CompleteWizardStep ID="CompleteWizardStep1" runat="server">
                    </asp:CompleteWizardStep>
                </WizardSteps>
            </asp:CreateUserWizard>

但是,当查看网站的搜索代码时,表格仍在呈现中。

<tbody><tr style="height:100%;">
    <td><table style="height:100%;width:100%;border-collapse:collapse;" cellpadding="0" cellspacing="0">
        <tbody><tr>
            <td style="height:100%;width:100%;">

                                        <label for="Body_CreateUserWizard1_CreateUserStepContainer_UserName" id="Body_CreateUserWizard1_CreateUserStepContainer_UserNameLabel">User Name:</label>

                                        <input name="ctl00$Body$CreateUserWizard1$CreateUserStepContainer$UserName" id="Body_CreateUserWizard1_CreateUserStepContainer_UserName" type="text">
                                        <span data-val-controltovalidate="Body_CreateUserWizard1_CreateUserStepContainer_UserName" data-val-errormessage="User Name is required." data-val-validationgroup="CreateUserWizard1" id="Body_CreateUserWizard1_CreateUserStepContainer_UserNameRequired" title="User Name is required." data-val="true" data-val-evaluationfunction="RequiredFieldValidatorEvaluateIsValid" data-val-initialvalue="" style="visibility:hidden;">*</span>

                                        <label for="Body_CreateUserWizard1_CreateUserStepContainer_Password" id="Body_CreateUserWizard1_CreateUserStepContainer_PasswordLabel">Password:</label>

                                        <input name="ctl00$Body$CreateUserWizard1$CreateUserStepContainer$Password" id="Body_CreateUserWizard1_CreateUserStepContainer_Password" type="password">
                                        <span data-val-controltovalidate="Body_CreateUserWizard1_CreateUserStepContainer_Password" data-val-errormessage="Password is required." data-val-validationgroup="CreateUserWizard1" id="Body_CreateUserWizard1_CreateUserStepContainer_PasswordRequired" title="Password is required." data-val="true" data-val-evaluationfunction="RequiredFieldValidatorEvaluateIsValid" data-val-initialvalue="" style="visibility:hidden;">*</span>

                                        <label for="Body_CreateUserWizard1_CreateUserStepContainer_ConfirmPassword" id="Body_CreateUserWizard1_CreateUserStepContainer_ConfirmPasswordLabel">Confirm Password:</label>

                                        <input name="ctl00$Body$CreateUserWizard1$CreateUserStepContainer$ConfirmPassword" id="Body_CreateUserWizard1_CreateUserStepContainer_ConfirmPassword" type="password">
                                        <span data-val-controltovalidate="Body_CreateUserWizard1_CreateUserStepContainer_ConfirmPassword" data-val-errormessage="Confirm Password is required." data-val-validationgroup="CreateUserWizard1" id="Body_CreateUserWizard1_CreateUserStepContainer_ConfirmPasswordRequired" title="Confirm Password is required." data-val="true" data-val-evaluationfunction="RequiredFieldValidatorEvaluateIsValid" data-val-initialvalue="" style="visibility:hidden;">*</span>

                                        <label for="Body_CreateUserWizard1_CreateUserStepContainer_Email" id="Body_CreateUserWizard1_CreateUserStepContainer_EmailLabel">E-mail:</label>

                                        <input name="ctl00$Body$CreateUserWizard1$CreateUserStepContainer$Email" id="Body_CreateUserWizard1_CreateUserStepContainer_Email" type="text">
                                        <span data-val-controltovalidate="Body_CreateUserWizard1_CreateUserStepContainer_Email" data-val-errormessage="E-mail is required." data-val-validationgroup="CreateUserWizard1" id="Body_CreateUserWizard1_CreateUserStepContainer_EmailRequired" title="E-mail is required." data-val="true" data-val-evaluationfunction="RequiredFieldValidatorEvaluateIsValid" data-val-initialvalue="" style="visibility:hidden;">*</span>

                                        <label for="Body_CreateUserWizard1_CreateUserStepContainer_Question" id="Body_CreateUserWizard1_CreateUserStepContainer_QuestionLabel">Security Question:</label>

                                        <input name="ctl00$Body$CreateUserWizard1$CreateUserStepContainer$Question" id="Body_CreateUserWizard1_CreateUserStepContainer_Question" type="text">
                                        <span data-val-controltovalidate="Body_CreateUserWizard1_CreateUserStepContainer_Question" data-val-errormessage="Security question is required." data-val-validationgroup="CreateUserWizard1" id="Body_CreateUserWizard1_CreateUserStepContainer_QuestionRequired" title="Security question is required." data-val="true" data-val-evaluationfunction="RequiredFieldValidatorEvaluateIsValid" data-val-initialvalue="" style="visibility:hidden;">*</span>

                                        <label for="Body_CreateUserWizard1_CreateUserStepContainer_Answer" id="Body_CreateUserWizard1_CreateUserStepContainer_AnswerLabel">Security Answer:</label>

                                        <input name="ctl00$Body$CreateUserWizard1$CreateUserStepContainer$Answer" id="Body_CreateUserWizard1_CreateUserStepContainer_Answer" type="text">
                                        <span data-val-controltovalidate="Body_CreateUserWizard1_CreateUserStepContainer_Answer" data-val-errormessage="Security answer is required." data-val-validationgroup="CreateUserWizard1" id="Body_CreateUserWizard1_CreateUserStepContainer_AnswerRequired" title="Security answer is required." data-val="true" data-val-evaluationfunction="RequiredFieldValidatorEvaluateIsValid" data-val-initialvalue="" style="visibility:hidden;">*</span>

                                        <span data-val-controltovalidate="Body_CreateUserWizard1_CreateUserStepContainer_ConfirmPassword" data-val-errormessage="The Password and Confirmation Password must match." data-val-display="Dynamic" data-val-validationgroup="CreateUserWizard1" id="Body_CreateUserWizard1_CreateUserStepContainer_PasswordCompare" data-val="true" data-val-evaluationfunction="CompareValidatorEvaluateIsValid" data-val-controltocompare="Body_CreateUserWizard1_CreateUserStepContainer_Password" data-val-controlhookup="Body_CreateUserWizard1_CreateUserStepContainer_Password" style="display:none;">The Password and Confirmation Password must match.</span>



                        </td>
        </tr>
    </tbody></table></td>
</tr><tr>
    <td align="right"><table style="height:100%;width:100%;" cellpadding="5" cellspacing="5">
        <tbody><tr align="right">
            <td align="right"><input name="ctl00$Body$CreateUserWizard1$__CustomNav0$StepNextButtonButton" value="Create User" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$Body$CreateUserWizard1$__CustomNav0$StepNextButtonButton&quot;, &quot;&quot;, true, &quot;CreateUserWizard1&quot;, &quot;&quot;, false, false))" id="Body_CreateUserWizard1___CustomNav0_StepNextButtonButton" type="submit"></td>
        </tr>
    </tbody></table></td>
</tr>

有没有办法删除此表。

0 个答案:

没有答案