0
我使用窗体标签之外的一些按钮,当点击时需要从代码后面的文件调用方法。问题是,它看起来不可能使用asp.net web表单,因为它需要表单标签中的所有内容,以便使用代码隐藏文件。asp.net web窗体中的窗体标签之外的调用方法
我的问题是基于设计的。我无法将所有内容放在表单标签中。这里是我的代码
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<script src="Scripts/dropzone.js"></script>
<link href="Content/dropzone.css" rel="stylesheet" />
<div>
<div class="fallback">
<input name="file" type="file" multiple />
</div>
</div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent2" runat="server">
<div style="width:30%;margin:0 auto; padding-top:50px">
<a class="btn btn-danger btn-lg" id="help" href="#">
<i class="fa fa-question"></i> Got Questions
</a>
<a class="btn btn-danger btn-lg" href="#" id="validate_Click" style="margin-left:40px;">
<i class="fa fa-check-square"></i> Validate
</a>
</div>
<script>
$("#help").click(function() {
swal("Here's a message!");
});
</script>
</asp:Content>
为什么你不能在表单标签中放置所有东西? –
我需要按钮对齐在我使用拖放的地方下面 – leon123
当你有主页面时,内容占位符之间的所有内容都在窗体之间(主页面窗体) –