Here, I want to pass name attributes to the Form. But this is passing name as query string: Following is the code I have used:
@using (Html.BeginForm(“Upload”, “AjaxUpload”, new { @name = “form1” }))
{
I have also remove @ at name it works as query string. WOuld you please tell how to pass name attributes like below:
<form name = "form1" action = "..">
You have used a wrong overload of
BeginFormand it treats thenew { @name = "form1" }as the route values collection.You need to use a different overload which allows you to pass html attributes like this one: