Using Html.BeginForm with querystring

前端 未结 7 1613
无人共我
无人共我 2021-01-01 09:44

My url looks like this:

customer/login?ReturnUrl=home

In the login view, I have used this pattern of code which works fine.



        
7条回答
  •  星月不相逢
    2021-01-01 10:13

    Try @using(Html.BeginForm(null, null, FormMethod.Post, new { data_id="something" }))

    It should use the default logic to construct the url, just as if you used BeginForm()

    (never tried that though in such case, but I believe it should work)

提交回复
热议问题