First off I'm not sure whether this is the right category or not.
I am currently using the Umbraco pacakge subscribeunsubscribe to register people who want's to subscribe to a newsletter.
The newsletter form is placed in the master template, since it should be available on all pages. There is also a search form on the master template. And when things get really crazy there's also a form to handle unsubscription of the newsletter.
My question is...how can I have more than one form on a page? I know that there are some issues regarding this in asp.net but I don't know what to do to solve them.
Is it at all possible for me to do so when using the subscribeunsubscribe package?
I have seen the discussion on the link that Nik provided, but why not simply create a usercontrol with an input field and a button as your Newsletter signup (macro) - insert the usercontrol as a macro on your masterpage. Put an OnClick event on the button and handle it in your codebehind when the button is clicked...?
Hmmm, yes you are probably right that this is the best solution. But I'm not that skilled on .NET yet so I'm not so sure about what I should write in the OnClick event though? :)
If you can drop me an email with your current masterpage and current form fields and where they should post to I can quickly make you a usercontrol that does what you need. I can also email you an example if you prefer.
Create a macro for this usercontrol and put it on your masterpage - should work fine.
There could be some challenge as to which form event will be fired if the user hits enter instead of clicking the Submit or Search button, but you'll have to test that and there is different ways to fix it.
Having more than one form on a page...
Hi people
First off I'm not sure whether this is the right category or not.
I am currently using the Umbraco pacakge subscribeunsubscribe to register people who want's to subscribe to a newsletter.
The newsletter form is placed in the master template, since it should be available on all pages. There is also a search form on the master template. And when things get really crazy there's also a form to handle unsubscription of the newsletter.
My question is...how can I have more than one form on a page? I know that there are some issues regarding this in asp.net but I don't know what to do to solve them.
Is it at all possible for me to do so when using the subscribeunsubscribe package?
/Jan
pretty common issue actually. Here's a thread that might help.
http://our.umbraco.org/forum/developers/extending-umbraco/5360-Two-forms-on-the-same-page
Thanks,
Nik
Thanks Nik...I'll try the stuff mentioned there and post additional questions there if they should arise :)
/Jan
I have seen the discussion on the link that Nik provided, but why not simply create a usercontrol with an input field and a button as your Newsletter signup (macro) - insert the usercontrol as a macro on your masterpage. Put an OnClick event on the button and handle it in your codebehind when the button is clicked...?
@Morten
Hmmm, yes you are probably right that this is the best solution. But I'm not that skilled on .NET yet so I'm not so sure about what I should write in the OnClick event though? :)
If you can drop me an email with your current masterpage and current form fields and where they should post to I can quickly make you a usercontrol that does what you need. I can also email you an example if you prefer.
I'll DM you my email.
- Morten
Hi Jan, this is an example of what I would do:
In your UserControl (.ascx):
Codebehind (.ascx.cs):
Create a macro for this usercontrol and put it on your masterpage - should work fine.
There could be some challenge as to which form event will be fired if the user hits enter instead of clicking the Submit or Search button, but you'll have to test that and there is different ways to fix it.
Hope this helps you out, otherwise let me know ;)
- Morten
is working on a reply...