private void _postFormToSalesForce() { var myPost = new WebPostRequest("https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8"); myPost.Add("oid", "00DA0000000K4ZY"); myPost.Add("first_name", fname.Text); myPost.Add("last_name", lname.Text); myPost.Add("company", company.Text); myPost.Add("email", email.Text); myPost.Add("phone", dayPhone.Text); if ((findUs.SelectedItem.Text + " " + sourceOther.Text).Length > 40) { myPost.Add("lead_source", (findUs.SelectedItem.Text + " " + sourceOther.Text).Substring(0, 40)); } else { myPost.Add("lead_source", (findUs.SelectedItem.Text + " " + sourceOther.Text)); } myPost.Add("description", "Web Site Private Group Inquiry - Preferred Location: " + ddlLocation.SelectedValue + ", Attendee Count: " + ddlAttendeeCount.SelectedValue + ", Preferred Course: " + ddlCourse.SelectedValue + ", Comments: " + comments.Text); myPost.GetResponse(); }
private void _postFormToSalesForce() { WebPostRequest myPost = new WebPostRequest("https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8"); myPost.Add("oid", "00DA0000000K4ZY"); myPost.Add("first_name", fname.Text); myPost.Add("last_name", lname.Text); myPost.Add("company", company.Text); myPost.Add("email", email.Text); myPost.Add("phone", dayPhone.Text); if ((findUs.SelectedItem.Text + " " + sourceOther.Text).Length > 40) { myPost.Add("lead_source", (findUs.SelectedItem.Text + " " + sourceOther.Text).Substring(0, 40)); } else { myPost.Add("lead_source", (findUs.SelectedItem.Text + " " + sourceOther.Text)); } myPost.Add("description", "Web Site Contact Us Inquiry - Comments: " + comments.Text); myPost.GetResponse(); }