I have created a user control to be used as webtolead form. The site is done in Sitefinity.
The usercontrol is given in a masterpage. The hidden fields oid, sfga are given in the ascx file.
In the codebehind, I am submitting the form elements values using Response.Redirect method.
But though it seems to submit data to SalesForce and is redirecting to a thankyou page, I am not getting the email. That means there is some issue. Here is my code for submit button click
Response.Redirect("https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8&first_name=" + this.txtFname.Value +
"&last_name=" + this.txtLName.Value + "&company=" + this.txtCompany.Value +
"&state=" + this.txtState.Value + "&phone=" + this.txtPhone.Value +
"&email=" + this.txtEmail.Value + "&00N80000002PziG=" + this.ddlPrimaryInt.SelectedItem.Value +
"&description=" + this.txtComments.Value + "&Campaign_ID=" + this.Campaign_ID.Value +
"&retURL=" + "http://" + urlHost + "/lp/thankyou");
Can anyone please help me with this.
First of all, my doubt is can this be done using a user control. In the salesforce site, the example is see is done using html.