是否可以将这两个html表组合成一个表? 无论如何,我似乎都无法做到,它要么告诉我没有开始标签,要么没有关闭标签。
目标:
1)一个<table>
有两个<tr>
,每个<tr>
有两个<td>
。
2)热门<tr>
顶部下载按钮(顶部表单)。
3)底部<tr>
的底部下载按钮(来自底部表单)。
<table>
<tr>
<td></td>
<td>
@using (Html.BeginForm("GenerateExcelReport", "Pages", FormMethod.Post, new { name = "formExcel", id = "formExcel" }))
{
@Html.DevExpress().Button(button =>
{
button.ClientSideEvents.Click = "OnClick";
button.Name = "buttonExcel";
button.Text = Resources.Global.buttonExportExcelExtra;
button.UseSubmitBehavior = true;
}).GetHtml()
}
</td>
</tr>
</table>
@using (Html.BeginForm("DownloadMainReport", "Pages", FormMethod.Post))
{
<table>
<tr>
<td style="padding:2px;">
@Html.DevExpress().ComboBox(settings =>
{
settings.Name = "ExportMode";
settings.Properties.Caption = Resources.Global.labelExportMode;// "Details Export Mode ";
settings.Properties.ValueType = typeof(GridViewDetailExportMode);
settings.SelectedIndex = 0;
}).BindList(Enum.GetValues(typeof(GridViewDetailExportMode))).Bind(GridViewDetailExportMode.None).GetHtml()
</td>
<td style="padding:2px;">
@Html.DevExpress().Button(settings =>
{
settings.Name = "buttonExportExcel";
settings.Text = Resources.Global.buttonExportExcel;
settings.UseSubmitBehavior = true;
}).GetHtml()
</td>
</tr>
</table>
@Html.Partial("HomeReportPartial", Model)
}
即使我使用div,它也会告诉我它找不到匹配的标签。
<div class="container-fluid">
<div class="row">
<div class="col-md-1">1</div>
<div class="col-md-1">
@using (Html.BeginForm("test0", "test0", FormMethod.Post))
{ }
</div>
<div class="col-md-10">3</div>
</div>
@using (Html.BeginForm("test1", "test1", FormMethod.Post))
{
<div class="row">
<div class="col-md-1">1</div>
<div class="col-md-1">2</div>
<div class="col-md-10">3</div>
</div>
</div>
}
分析程序错误消息:遇到结束标记“div”,没有匹配的开始标记。您的开始/结束标签是否正确平衡?