|
|
Rank: Newbie
Joined: 7/17/2008 Posts: 13 Location: Prague
|
Hi, how can I have two or more user controls, both using a form, on one page so that they don't quarrel together? I'm aiming at a MemberLogin control and an AutoForm/Doc2Form control.
As I understand it, they have to both be until the <?ASPNET_FORM> tag. Now, if I do that and encapsulate all with this tag, their submit buttons then quarrel together and one influences the other. A member for example cannot log out, cause it's interpretted also as posting the AutoForm.
If I try to make two separate <?ASPNET_FORM> for each of them, it simply does not work, only the first one is parsed. Anyone got a solution for this? Thank you!
|
|
Rank: Newbie
Joined: 7/25/2008 Posts: 2 Location: switzerland
|
Hi deirh
I have the <?ASPNET_FORM> Tag in the main template and don't use form-tags in the controls.
|
|
 Rank: Umbracoholic
Joined: 9/8/2006 Posts: 1,689 Location: KY, USA
|
You can't have a form within a form. But you can have multiple forms as long as each is self-contained. Just open the form around the macro, then close it before opening another form for the second macro. cheers, doug.
MVP 2007-2009 - Official Umbraco Trainer for North America - Percipient Studios
|
|
 Rank: Umbracoholic
Joined: 7/20/2006 Posts: 1,074 Location: Charleston, West Virginia, United States
|
Ahh... Client Side validation getting you! Any thoughts?
• 2007/2008 MVP • 2008/2009 MVP • Certified • Licensing • Support • Development • Hosting •
|
|
 Rank: Umbracoholic
Joined: 7/20/2006 Posts: 1,074 Location: Charleston, West Virginia, United States
|
You should be able to disable the validation on the logout button for the member controls. Edit the control's ascx and add the following to the logout button's tag: CausesValidation="False" Case
• 2007/2008 MVP • 2008/2009 MVP • Certified • Licensing • Support • Development • Hosting •
|
|
Rank: Newbie
Joined: 7/17/2008 Posts: 13 Location: Prague
|
Can you please elaborate? If I put everything under one form in the master page, the Logout button does nothing. Tried adding what you proposed into Code:<asp:LinkButton id="LinkButtonLogout" runat="server" CausesValidation="False"> and it didn't seem to change anything. Does this mean I cannot put two form-using controls together on one page? ie. Member Register Form together with Member Login on the top of the page?
|
|
 Rank: Devotee
Joined: 12/6/2007 Posts: 61
|
You can definetly have mutiple "form-using" controls together on one page. You could look into using validation group. http://msdn.microsoft.com/en-us/library/ms227424.aspx. i.e group all your member controls into one validation group.
New Zealand Umbracoee
|
|
Rank: Newbie
Joined: 7/17/2008 Posts: 13 Location: Prague
|
Thanks for the link, I will study it asap :)
|
|
|
Guest |