在我看来,我禁用或启用如下链接。即使视图中禁用了“被保险人或所有者名称更改”链接,我也可以通过“http://localhost:0000/NameChangeRequest?contract=111111”之类的 url 访问它,这不应该发生。谁可以帮我这个事?
@if (Model.CanCreateNameChangeRequest)
{
@Html.ActionLink("Insured or Owner Name Change", "Index", "NameChangeRequest", new { @contract = Model.ContractNumber }, new { @class = "requestLink" });
}
else
{
<span class="requestLinkDisabled">Insured or Owner Name Change</span>
}