Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>lots of ways to do this. the javascript way like @Mitchel Sellers is one. </p> <p>you could create your own form, do normal asp.net validation on it, when you're happy, create your own http post through the <code>WebRequest</code> class, and fire it off the values to the target site. </p> <p>yet another way would be to alter the action target on the form, first time, have it submit to your page, when you're happy with the input, alter it to submit to the target site.</p> <p>as requested, example on how to use post. take the below with a pinch of salt, I cant run this to test it myself, but you should be able to get the general idea from the below</p> <pre> <code> NameValueCollection nameValues = new NameValueCollection(); nameValues.Add("subscribeBoxId", "a"); nameValues.Add("subscribeBoxTitle", "b"); nameValues.Add("isExternal", "c"); nameValues.Add("externalPublicationId", "d"); nameValues.Add("sf_name.firstName_required", "e"); postValues(new Uri("http://somewhere/somePage.aspx"), nameValues); </code> </pre> <pre> <code> private static string postValues(Uri target, NameValueCollection nameValues) { string resultData = null; HttpServerUtility urlEncoder = new HttpServerUtility(); string postData = string.Join("&", nameValues.Keys.Cast().Select(key => string.Format("{0}={1}", key, urlEncoder.UrlEncode(nameValues[key])))); HttpWebRequest httpRequest = (HttpWebRequest)WebRequest.Create(target); httpRequest.Method = "POST"; httpRequest.ContentLength = postData.Length; httpRequest.ContentType = "application/x-www-form-urlencoded"; StreamWriter myWriter = new StreamWriter(httpRequest.GetRequestStream()); myWriter.Write(postData); myWriter.Close(); HttpWebResponse httpResponse = (HttpWebResponse)httpRequest.GetResponse(); using (StreamReader reader = new StreamReader(httpResponse.GetResponseStream())) { resultData = reader.ReadToEnd(); reader.Close(); } return resultData; } </code> </pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload