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
|