Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Registration Form with Newsletter Subscription View modes: 
User avatar
Member
Member
kommand - 2/1/2011 8:04:01 AM
   
Registration Form with Newsletter Subscription
Hi guys,
is there any simple way to add the Newsletter Subscription as a checkbox (as the Kentico.com registration webpage http://www.kentico.com/logon.aspx )?

I've created an alterantive form starting from system table, with some other field I need for the user registration, but how can I add the subscription to this Form?

Thanks in advance for any help.
Marco

User avatar
Kentico Support
Kentico Support
kentico_radekm - 3/1/2011 3:55:31 PM
   
RE:Registration Form with Newsletter Subscription
Hello.

I would recommend you to use Custom registration form web part (/CMSWebParts/Membership/Registration/CustomRegistrationForm.ascx) and add this checkbox ad physical .NET CheckBox control into that control.

Then, you can check whether this checkbox is checked or not in code-behind, in btnRegister_Click method.

If so, you can subscribe given user via the same code as Newsletter subscription web part uses. This can be seen in /CMSWebParts/Newsletters/NewsletterSubscriptionWebPart.ascx.cs, SaveSubscriber method.

Best Regards,
Radek Macalik