0

我在使用 ASP.NET ajax 时遇到问题。

我正在使用带有 ajax 的侧栏/对话框,以便在单击侧栏/对话框中的按钮时不需要刷新页面。但是,它无法加载。在某处我看到了添加 EnableCdn="true" 的解决方案并应用了它。它使浏览器不刷新,但问题是在对话框中提交表单后,它使对话框成为空白屏幕。

<asp:ScriptManager ID="ScriptManager1" EnablePartialRendering="true" EnableCdn="true" runat="server">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
  <ContentTemplate>
    <div class="sidebar">
      <div class="sidebar__wrapper">
        <div class="sidebar__close js-toggle-sidebar visible-xs">
          <span class="oi oi-x"></span>
        </div>
        <div class="sidebar__form form_alt">
          <div class="form-group">
            <label class="sr-only" for="login__username">Username</label>
            <asp:TextBox type="text" class="form-control" runat="server" id="txtUserName" placeholder="Username"></asp:TextBox>
          </div>
          <div class="form-group">
            <label class="sr-only" for="login__password">Password</label>
            <asp:TextBox type="password" class="form-control" runat="server" id="txtPassword" placeholder="Password"></asp:TextBox>
          </div>
          <asp:Button runat="server" type="submit" class="btn btn-block btn-primary" UseSubmitBehavior="false" ID="btnSignIn" Text="Sign In" OnClick="btnSignIn_Click"></asp:Button>
        </div>
        <h4 class="sidebar__heading">Didn't invite anyone?</h4>
        <ul class="sidebar__menu">
          <li><a href="#">Sign Up</a></li>
        </ul>
        <div class="sidebar__form form_alt">
          <div class="form-group">
            <label class="sr-only" for="login__username">Email</label>
            <asp:TextBox type="text" runat="server" class="form-control" id="txtSignUpEmail" placeholder="Email"></asp:TextBox>
          </div>
          <div class="form-group">
            <label class="sr-only" for="login__username">Username</label>
            <asp:TextBox type="text" runat="server" class="form-control" id="txtSignUpUserName" placeholder="Username"></asp:TextBox>
          </div>
          <div class="form-group">
            <label class="sr-only" for="login__password">Password</label>
            <asp:TextBox type="password" runat="server" class="form-control" id="txtSignUpPassword" placeholder="Password"></asp:TextBox>
          </div>
          <div class="form-group">
            <label class="sr-only" for="login__password">Repeat Password</label>
            <asp:TextBox  type="password" runat="server" class="form-control" id="txtSignUpRepeatPassword" placeholder="Repeat Password"></asp:TextBox>
          </div>
          <asp:Button type="submit" runat="server" ID="btnSignUp" class="btn btn-block btn-primary" Text="Sign UP" OnClick="btnSignup_Click" ></asp:Button>
     [... missing three </div>s here ...]
   </ContentTemplate>
</asp:UpdatePanel>
4

0 回答 0