小编Igo*_*gor的帖子

Asp.net核心包括发布文件

是否可以在发布时包含一些文件并将它们放在特定的文件夹中.我想将所有报告文件(*.rdlc)放在发布位置的文件夹Reports中.

我尝试过:

  <ItemGroup>
    <Content Include="..\Reports\**\*.rdlc" PackagePath="\Reports"  CopyToPublishDirectory="Always"/>
  </ItemGroup>
Run Code Online (Sandbox Code Playgroud)

但它始终将文件放入已发布目标的根目录.

asp.net-core

2
推荐指数
1
解决办法
1762
查看次数

ASP.Net MVC 6 PartialView模型绑定混淆

背景 我们需要提交带有项目的模型.为此,我们制作了这个复杂的模型:

public class PaymentViewModel
{
  public decimal? Payment { get; set; }
  public string Description { get; set; }

  public List<SplittedPaymentViewModel> SplittedPayment { get; set; } = new List<SplittedPaymentViewModel>();
}

public class SplittedPaymentViewModel
{
  public short SplittedPaymentId { get; set; }
  public decimal? Payment { get; set; }
  public string Description { get; set; }
}
Run Code Online (Sandbox Code Playgroud)

对于渲染html,我们这两个视图,一个常规:CreatePayment

@model ZevApp.ViewModels.Record.PaymentViewModel
...
<input class="form-control" asp-for="Payment" type="number" />
<input class="form-control" asp-for="Description" />
...
<div class="panel-body" id="SplittedPayments">
@foreach (var spItem in Model.SplittedPayment) …
Run Code Online (Sandbox Code Playgroud)

asp.net-core-mvc

1
推荐指数
1
解决办法
1121
查看次数

标签 统计

asp.net-core ×1

asp.net-core-mvc ×1