1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Webtolead form with user control not working

Webtolead form with user control not working

2 posts, 0 answered
  1. Surya CD
    Surya CD avatar
    57 posts
    Registered:
    06 Apr 2010
    23 Jun 2012
    Link to this post
    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("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.

    Thanks.
  2. Tim
    Tim avatar
    258 posts
    Registered:
    22 Jun 2011
    25 Jun 2012
    Link to this post
    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.
2 posts, 0 answered