我在我的 asp.net 站点中使用 Bootstrap 模态,模态工作正常,但模态页脚内的按钮 btnSaveImage 没有触发单击事件,我也有一个母版页,并且其中有表单标记。
这是我的代码:
<a href="#dvUpload" data-toggle="modal">
<asp:Button runat="server" ID="lnkUploadPics" CssClass=" btn-large Greengradiant"
Width="100%" Text="Upload pictures"></asp:Button>
</a>
<div id="dvUpload" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
×</button>
<h3 id="myModalLabel">
Upload Image</h3>
</div>
<div class="modal-body">
<div class="row-fluid" style="padding-left: 10px; padding-right: 10px; padding-bottom: 20px;">
<div id="Upload" class="span6">
<asp:FileUpload ID="fuImage" runat="server" />
<img id="imgUPload" runat="server" src="" />
</div>
</div>
</div>
<div class="modal-footer">
<button data-dismiss="modal" class="btn btn-large"> Close</button>
<asp:Button runat="server" ID="btnSaveImage" Text="Save Image" CssClass="Greengradiant btn-large" OnClick="btnSaveImage_Click" />
</div>
</div>