Using Html.BeginForm with querystring

前端 未结 7 1562
无人共我
无人共我 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:38

    This works for me :

    @using (Html.BeginForm("index", "Photos", routeValues: new { user = pUser, album = pAlbum, }, method: FormMethod.Get))
    

    Explicit route values and method is what is required...

提交回复
热议问题