Dot*_*row 6 asp.net twitter-bootstrap twitter-bootstrap-3
我在我的asp.net页面中使用bootstrap模式,如下所示:
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
aria-hidden="true">
<asp:UpdatePanel ID="ModalUpdatePanel" runat="server" UpdateMode="Conditional">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnRegister" EventName="Click" />
</Triggers>
<ContentTemplate>
<p>
textboxes here
<div class="popup-footer-wrapper">
<div class="popup-footer-left">
<%-- <input type="submit" class="login-button" name="login-button" value="Sign Up">--%>
<asp:Button ID="btnRegister" runat="server" CssClass="login-button" OnClick="btnRegister_Click"
UseSubmitBehavior="false" Text="<%$ Resources: HRGELoggedOutMaster, Signup %>" />
</div>
</div>
</p>
</ContentTemplate>
</asp:UpdatePanel>
</div>
Run Code Online (Sandbox Code Playgroud)
我在里面看到了
protected void btnRegister_Click(object sender, EventArgs e)
Run Code Online (Sandbox Code Playgroud)
所有texbox都显示空值.文本框中的任何用户类型.请建议如何解决它.可能是因为UseSubmitBehavior ="false"但是如果我不使用它,那么控制不会转到onclick事件.
您没有看到发布值的原因是因为您的值未被发布.引导模态管理器使用'body'元素作为它附加模态的根元素.因此,您的模态现在位于"form"元素之外,并且值不会发布回服务器.
要解决此问题,请更改"manager"属性的默认值,如下所示:
// Note the manager is passed to the root form element.
// Otherwise, the modals are taken out of the form and
// values not posted back to the server
$.fn.modal.defaults.manager = $.fn.modalmanager.defaults.manager = 'body form:first';
Run Code Online (Sandbox Code Playgroud)
编辑:这是假设您正在使用Bootstrap-Modal扩展
| 归档时间: |
|
| 查看次数: |
4812 次 |
| 最近记录: |