How do I redirect a user when a button is clicked?

前端 未结 10 809
情话喂你
情话喂你 2020-12-13 05:30

I have a view with a button. When the user clicks the button I want them redirected to a data entry view. How do I accomplish this? I should mention the views are created, t

10条回答
  •  鱼传尺愫
    2020-12-13 06:15

    Just as an addition to the other answers, here is the razor engine syntax:

    
    

    or

    window.location.href = '@Url.Action("actionName", "controllerName")';
    

提交回复
热议问题