Webtolead form with user control not working

Posted by Community Admin on 04-Aug-2018 04:27

Webtolead form with user control not working

All Replies

Posted by Community Admin on 23-Jun-2012 00:00

Hi,
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("www.salesforce.com/.../servlet.WebToLead + 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.

Thanks.

Posted by Community Admin on 25-Jun-2012 00:00

It looks like you're doing a "GET", should it be a "POST"?

I found a web to lead class that may be of use.

This thread is closed