MVC3: What's the meaning of the htmlAttributes in this line?

The fourth parameter of this call to BeginForm is "object htmlAttributes".

 @using (Html.BeginForm("StructureCheck", "Samples", new { id = Model.SubmissionID }, FormMethod.Post, new { id = "selectProduct" }))

In this case, the value being passed is:
new { id = "selectProduct" }

What does this do exectly?
newbiewebSr. Software EngineerAsked:
Who is Participating?
 
käµfm³d 👽Connect With a Mentor Commented:
According to http://msdn.microsoft.com/en-us/library/dd460542.aspx , it should be adding those attributes to the <form> tag that is generated by the BeginForm function. So for your example, your resulting page should show:

<form id="selectProduct">

Open in new window

0
 
newbiewebSr. Software EngineerAuthor Commented:
I don't get what you mean by "adding those attributes". It's a parameter in the BeginForm call, which then contains the entire form.

Please explain further, if you could.

Thanks.
0
 
newbiewebSr. Software EngineerAuthor Commented:
Thanks. I do get it.

Thank you.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.