Jake - notice the difference between id and name.
what gets posted from the Form to the server are values *by name*.
on the other hand, the element identifier in the DOM is id, which must be
singular on a web page.

so
have your three forms, each with the same names for the fields, but with
different ids.
That is how you do web development.

now as far as the endpoint on the server, my personal preference is that if
you have different forms, they probably serve a slightly different purpose,
and I'd have three controller actions (i'd even separate them by name) to
deal with them.



On Fri, Apr 9, 2010 at 12:28 AM, John Simons <johnsimons...@yahoo.com.au>wrote:

> Hi Jake,
>
> I think you answered your own question, don't use the same action have
> an action per tab.
> Eg.
> public void ActionForTabs([DataBind("Tab1Data", Validate =
> true)]Tab1Data data){}
>
> public void ActionForTabs([DataBind("Tab2Data", Validate =
> true)]Tab2Data data){}
>
> public void ActionForTabs([DataBind("Tab3Data", Validate =
> true)]Tab3Data data){}
>
> Does this help?
>
> Cheers
> John
>
> On Apr 9, 6:41 am, jake <jak...@gmail.com> wrote:
> > I'm having an issue with my webpage using javascript and monorail
> > param binding.  I have a page the uses jquery UI to display tabs, each
> > tab has a form that submits to the same action.  The issue is that by
> > using the same action I am forced to create multiple elements with the
> > same ID.  This is not only a bad practice, it breaks the javascript
> > used for form validation.  Any Ideas?  I've looked into using an
> > identifier, such as element1, element2, and then in my action binding
> > element by something like this:
> >
> > string element = Form["{regex match element%d}"]
> >
> > I'm looking for a solution that would be more elegant.
> >
> > Thanks,
> > Jake
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> "Castle Project Users" group.
> > To post to this group, send email to
> castle-project-us...@googlegroups.com.
> > To unsubscribe from this group, send email to
> castle-project-users+unsubscr...@googlegroups.com<castle-project-users%2bunsubscr...@googlegroups.com>
> .
> > For more options, visit this group athttp://
> groups.google.com/group/castle-project-users?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Castle Project Users" group.
> To post to this group, send email to castle-project-users@googlegroups.com
> .
> To unsubscribe from this group, send email to
> castle-project-users+unsubscr...@googlegroups.com<castle-project-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/castle-project-users?hl=en.
>
>


-- 
Ken Egozi.
http://www.kenegozi.com/blog
http://www.delver.com
http://www.musicglue.com
http://www.castleproject.org
http://www.idcc.co.il - הכנס הקהילתי הראשון למפתחי דוטנט - בואו בהמוניכם

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to castle-project-us...@googlegroups.com.
To unsubscribe from this group, send email to 
castle-project-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en.

Reply via email to