protected void btnCreateUser_Click(object sender, EventArgs e) { WebPostRequest req = new WebPostRequest("http://student.pinnacle3learning.com/index.php/add-a-user"); var dic = new Dictionary<string, string>(); dic.Add("import", "1"); dic.Add("name", "jon jon"); dic.Add("email", "*****@*****.**"); string s = req.ExecutePostRequest(dic); lblMessage.Text = s; }
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(); }
private bool doCreateUserInStudentRegistrationSystem(string name, string email) { bool success = true; WebPostRequest req = new WebPostRequest(ConfigurationManager.AppSettings["SRS_AddAUser_Url"]); var dic = new Dictionary<string, string>(); dic.Add("import", "1"); dic.Add("name", name); dic.Add("email", email); try { var s = req.ExecutePostRequest(dic); if (!s.Contains("has been added to the joomla membersystem")) success = false; } catch { success = false; } return success; }