customized email signup with radio box
Posted: Fri Aug 30, 2013 8:31 am
I am trying to integrate the email signup in one of the programs I have. I added the code below, but it is not working. Want to add an email to the default email list only if the user checked "Yes" on a radio box.
Can anyone make any suggestions.
thank you.
Can anyone make any suggestions.
thank you.
Code: Select all
protected void Page_Init(object sender, EventArgs e)
{
if (_EmailListId == 0)
{
_EmailListId = Token.Instance.Store.Settings.DefaultEmailListId;
}
}
.
.
.
.
try
{
string lclEmail = Page.Request.Form["Email"];
string lclSignup = NewsletterSignup.Text.ToString();
EmailList LclEmailList = EmailListDataSource.Load(_EmailListId);
if(lclSignup == "Yes" ) {
if (LclEmailList.IsMember(lclEmail) == false) {
LclEmailList.ProcessSignupRequest(lclEmail);
}
}
}
catch (System.Data.OleDb.OleDbException exception)
{
}
/////////////////////////////////////////
}