csharp 动作重定向
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了csharp 动作重定向相关的知识,希望对你有一定的参考价值。
public ActionResult ViewByPolicyNo(long? policyNo)
{
return RedirectToAction("View", new { id = 1779449 });
}
[Breadcrumb]
public async Task<ActionResult> View(long? id)
{
PolicyListDto policyListDto = null;
if (TempData["PolicyData"] != null)
policyListDto = (PolicyListDto)TempData["PolicyData"];
else
{
if (!id.HasValue)
throw new UserFriendlyException("Görüntülemek istenilen poliçe Id'sini giriniz.");
policyListDto =await _policyAppService.GetPolicyInputWithAllDetail(id.Value);
}
return View(policyListDto);
}
以上是关于csharp 动作重定向的主要内容,如果未能解决你的问题,请参考以下文章