As we all know RenderAction()
is either part of:
- Asp.net MVC 1 Futures or
- Asp.net MVC 2 Beta 2
and allows us to render action result inside another view or partial view.
Description
- You have a view with multiple partial views displayed using
RenderAction()
helper. - At least two partial views render a
<form>
probably by usingHtml.BeginForm()
that postback to original view. - Postback is not performed via Ajax call
- Postback data is validated upon form POST.
Problem
When one of the forms gets posted back the other one renders as invalid.
Has anyone used this pattern and solved it? We should somehow know which form
performed postback and only that one should validate its POST data. Others should either ignore validation or perform regular HttpVerb.Get
action processing.