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

前端 未结 10 796
情话喂你
情话喂你 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:13

    $("#yourbuttonid").click(function(){ document.location = "<%= Url.Action("Youraction") %>";})
    

提交回复
热议问题