Geeks With Blogs
Bob Palmer's Developer Blog .NET, SQL, and Silverlight Development January 2010 Entries
Adding an ID property to an HTML form in MVC
If you're using both JQuery and MVC, odds are you're going to want to easily reference your form elements by ID. To handle this using the built in HTML form helper class, you will need to use some of the parameters. For example, if I have a controller named 'Message', with an action named 'AddTopic' and want to create an HTML form that executes a Post with an ID and Name both of 'posttopic', I would use the following code snippet: <% using (Html.BeginForm("AddTopic", "Message", FormMethod.Post, ......

Posted On Saturday, January 23, 2010 5:21 PM

Copyright © BobPalmer | Powered by: