• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 296
  • Last Modified:

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?
0
newbieweb
Asked:
newbieweb
  • 2
1 Solution
 
käµfm³d 👽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
 
newbiewebAuthor 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
 
newbiewebAuthor Commented:
Thanks. I do get it.

Thank you.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now