Hi
the
<% using (Html.BeginForm()) { %>
has an overload method
Html.BeginForm(string actionname, string controllerName, RouteValueDictionary routeValues).
So this code...
<br />
<% using (Html.BeginForm("myTestmethod", "myTestController", new { id = "123" }))<br />
{ %><br />
will generate this html markup....
<br />
<br />
<form action="/myTestController/myTestmethod/123" method="post"><br />
<br />
as you have asked passing the id. However you need to have a matching route for this..
so in your routes ..define any specific routes as well...
routes.MapRoute(
"Default",
"{controller}/{action}/{id}",
new { controller = "myTestController", action = "myTestmethod", id = UrlParameter.Optional }
);
I hope this helps you