Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
This is more of an mvc question.
I have 2 partials on a page. Both have forms which post to different controllers. The models are different.
Both models have a property called Name, which renders as a textbox.
After a post of one form, the page renders, but both forms now have the value in their respective textboxes. Something is happening to model bind both forms to the posted value.
i'm not sure if this is best practise but done it before by setting a HtmlFieldPrefix on the TemplateInfo which you can pass in your ViewDataDictionary... i'll see if i can digg up that piece of code again.
Can't seem to find it atm, but here's a sample i've found on the www http://code.lawrab.com/2012/05/using-bind-prefix-in-aspnet-mvc.html
Nice! That looks like exactly what i need!
I realize this is an old thread, but what's the next step? I did what was shown in the link, but I can't get the forms to process.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted