向导控件不起作用

发布于 2024-09-02 07:37:11 字数 562 浏览 7 评论 0原文

我是 ASP.NET 向导控件的新手,无法使其工作。我猜想代码中存在一个小问题,导致向导无法显示。这是我放入服务器表单中的代码片段。

<asp:Wizard id="Wizard1" runat="server" >

   <asp:WizardSteps>

    <asp:WizardStep runat="server" id="firstStep" Title="First step">        

     What is your name<asp:TextBox id="txtName" />

    </asp:WizardStep>

    <asp:WizardStep runat="server" AllowReturn="false"  id="lastStep" Title="Last step">

     That's all for today. Good bye.

    </asp:WizardStep>

   </asp:WizardSteps>

  </asp:Wizard>

I'm new to the ASP.NET's Wizard control and couldn't make it work. I guess there is a minor issue in the code that prevent the wizard from displaying. Here is the code snippet that I put inside a server form.

<asp:Wizard id="Wizard1" runat="server" >

   <asp:WizardSteps>

    <asp:WizardStep runat="server" id="firstStep" Title="First step">        

     What is your name<asp:TextBox id="txtName" />

    </asp:WizardStep>

    <asp:WizardStep runat="server" AllowReturn="false"  id="lastStep" Title="Last step">

     That's all for today. Good bye.

    </asp:WizardStep>

   </asp:WizardSteps>

  </asp:Wizard>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

狼亦尘 2024-09-09 07:37:11

您有多个错误,例如 WizardSteps、缺少 runat="server" 以及其他一些错误,

请尝试此操作

 <asp:Wizard ID="Wizard2" runat="server">
<WizardSteps>
  <asp:WizardStep ID="WizardStep1" runat="server" Title="Step 1">
   What is your name<asp:TextBox id="TextBox1" runat="server" />
  </asp:WizardStep>
  <asp:WizardStep ID="WizardStep2" runat="server" Title="Step 2">
  That's all for today. Good bye.
  </asp:WizardStep>
</WizardSteps>

You have multiple errors like WizardSteps, missing runat="server" and some others

try this

 <asp:Wizard ID="Wizard2" runat="server">
<WizardSteps>
  <asp:WizardStep ID="WizardStep1" runat="server" Title="Step 1">
   What is your name<asp:TextBox id="TextBox1" runat="server" />
  </asp:WizardStep>
  <asp:WizardStep ID="WizardStep2" runat="server" Title="Step 2">
  That's all for today. Good bye.
  </asp:WizardStep>
</WizardSteps>

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文