tags:

views:

61

answers:

1

I am using the ASP.NET MVC framework, and have a page which currently posts back to itself, validates, then redirects if necessary as per best practice recommendations.

I now wish to add a feature that involves the user entering an 'offer code'. This code, if valid, will filter the options in the primary form on the page, which will then be submitted as per usual.

The 'offer code' form needs to be submitted. A redirect then takes the user back to the original page, but with the validated offer code in the URL (this is specified as an optional parameter).

The only option I can see to continue using the MVC validation features, is to put a conditional branch in my [HttpPost] method, since the framework does not allow you to specify multiple functions with different parameters.

Are there any better recommendations out there?