This is breaking my MailChimp signup form that i've inserted into a xslt macro inserted on my Homepage.master.
When removing the above form everything works as intended, but before i keep that solution i wanted to ask what this asp.net form is even good for and why it's there in the first place?
Could i not just my "runat=server" forms on the templates where needed, instead of residing in the umbMaster.master?
This is a classic problem in ASP.NET. Basically you can't nest forms inside the main asp.net form (i.e the one with runat=server) Also you can only have one form with runat=server on a page. This causes headaches when using things like paypal or email signup forms etc because they usually involve a form that posts to a remote server somewhere.
Any ASP.NET controls that require a postback must be contained inside a form tag with runat=server. Umbraco doesn't need this if you are just displaying content but if for example you wanted to put a login control or any kind of form tht requires postback you would run into an error if it is not inside a form with runat=server.
By default Umbraco master page has the form quite high up so most things are containd inside it. Usually I take it out altogether and just use standard HTML forms on my pages but if I do need to use ASP.NET controls that need it, I just add the form with runat = server at a lower level so just my controls that need it are contained by it. As long as your mail signup form is outside of the ASP.NET form you will be fine.
I have read lots of work arounds including ideas like ghost forms but I have rarely come accross a situation in umbraco where I can't just move my form to get around the issue.
Deleting the masterform (runat server) stuff?
Hi there
In my umbMaster.master i have this:
This is breaking my MailChimp signup form that i've inserted into a xslt macro inserted on my Homepage.master.
When removing the above form everything works as intended, but before i keep that solution i wanted to ask what this asp.net form is even good for and why it's there in the first place?
Could i not just my "runat=server" forms on the templates where needed, instead of residing in the umbMaster.master?
Any insights are much appreciated.
Could i not just my "runat=server"
Could i not just *add* my....
Hi Martin,
This is a classic problem in ASP.NET. Basically you can't nest forms inside the main asp.net form (i.e the one with runat=server) Also you can only have one form with runat=server on a page. This causes headaches when using things like paypal or email signup forms etc because they usually involve a form that posts to a remote server somewhere.
Any ASP.NET controls that require a postback must be contained inside a form tag with runat=server. Umbraco doesn't need this if you are just displaying content but if for example you wanted to put a login control or any kind of form tht requires postback you would run into an error if it is not inside a form with runat=server.
By default Umbraco master page has the form quite high up so most things are containd inside it. Usually I take it out altogether and just use standard HTML forms on my pages but if I do need to use ASP.NET controls that need it, I just add the form with runat = server at a lower level so just my controls that need it are contained by it. As long as your mail signup form is outside of the ASP.NET form you will be fine.
I have read lots of work arounds including ideas like ghost forms but I have rarely come accross a situation in umbraco where I can't just move my form to get around the issue.
I hope this helps
cheers
Hi Richard
Thanks for the details. Much appreciated :-)
In my case it's safe to remove it for now and add it on a lower level, if needed - as i had expected.
Better safe than sorry though ;)
is working on a reply...