Html 视图布局问题中的视图
我想在视图中显示一个视图。这是我想要的,但我有一个表的布局问题 我想将表格向左移动,使其位于“地址”按钮下。我不太清楚它为什么被放在原来的位置。这是我的报告视图Html 视图布局问题中的视图,html,asp.net-mvc,bootstrap-4,Html,Asp.net Mvc,Bootstrap 4,我想在视图中显示一个视图。这是我想要的,但我有一个表的布局问题 我想将表格向左移动,使其位于“地址”按钮下。我不太清楚它为什么被放在原来的位置。这是我的报告视图 @{ ViewBag.Title = "Reports"; Layout = "~/Views/Shared/_layout.cshtml"; } <h2>Reports</h2> <br /> <button id
@{
ViewBag.Title = "Reports";
Layout = "~/Views/Shared/_layout.cshtml";
}
<h2>Reports</h2>
<br />
<button id="address">Addresses</button>
<button id="Qualifications"> Qualifications</button>
<style>
#addrRpt { color: red;
background-color:blue;
margin-left:10px;
/*height: 250px;*/
}
</style>
<script>
document.getElementById("address").onclick = function () { myFunction() };
function myFunction() {
$("#addrRpt").load("@Html.Raw(Url.Action("index", "Addresses")) ")
}
</script>
@*<div class="row" >
<div class="col" style="background-color:red">
<div id="addrRpt">
</div>
</div>
</div>*@
<div id="addrRpt"></div>
@{
ViewBag.Title=“报告”;
Layout=“~/Views/Shared/_Layout.cshtml”;
}
报告
地址
资格
#addrRpt{颜色:红色;
背景颜色:蓝色;
左边距:10px;
/*高度:250px*/
}
document.getElementById(“地址”).onclick=function(){myFunction()};
函数myFunction(){
$(“#addrRpt”).load(@Html.Raw(Url.Action(“index”,“address”))))
}
@*
*@
将视图的布局设置为null解决了我的问题
布局=空