views:

121

answers:

1

Hi,

I have a similar question like this, only then in ASP.NET MVC. Basically I have this route:

/{Controller}/{Action}/{Id}

I have a HTML form like this:

<form action="/Controller/Action">
    <input type="text" name="Id" id="Id" />
    <input type="submit" value="Send" />
</form>

The form is created like so:

<% =Html.BeginForm("Action","Controller") %>

How can I have the FORM post or get to:
/Controller/Action/{ValueOfIDInputFieldInForm}?

A: 

This is a duplicate of http://stackoverflow.com/questions/8485/use-the-routing-engine-for-form-submissions-in-asp-net-mvc-preview-4.

Basically you need to create an action for the form to post to and redirect from there.

Garry Shutler