Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I found this on <a href="http://www.jigar.net/articles/viewhtmlcontent78.aspx" rel="nofollow noreferrer">another site</a>. </p> <p>I will build up a small form with just the variables you want, and output it to the client and submit itself. It's pretty neat, but it comes with the problem of breaking the back button, and sending the password back to the client in a form unencrypted.</p> <pre><code>public class RemotePost{ private System.Collections.Specialized.NameValueCollection Inputs = new System.Collections.Specialized.NameValueCollection() ; public string Url = "" ; public string Method = "post" ; public string FormName = "form1" ; public void Add( string name, string value ){ Inputs.Add(name, value ) ; } public void Post(){ System.Web.HttpContext.Current.Response.Clear() ; System.Web.HttpContext.Current.Response.Write( "&lt;html&gt;&lt;head&gt;" ) ; System.Web.HttpContext.Current.Response.Write( string .Format( "&lt;/head&gt;&lt;body onload=\"document.{0}.submit()\"&gt;" ,FormName)) ; System.Web.HttpContext.Current.Response.Write( string .Format( "&lt;form name=\"{0}\" method=\"{1}\" action=\"{2}\" &gt;" , FormName,Method,Url)) ; for ( int i = 0 ; i&lt; Inputs.Keys.Count ; i++){ System.Web.HttpContext.Current.Response.Write( string .Format( "&lt;input name=\"{0}\" type=\"hidden\" value=\"{1}\"&gt;" ,Inputs.Keys[i],Inputs[Inputs.Keys[i]])) ; } System.Web.HttpContext.Current.Response.Write( "&lt;/form&gt;" ) ; System.Web.HttpContext.Current.Response.Write( "&lt;/body&gt;&lt;/html&gt;" ) ; System.Web.HttpContext.Current.Response.End() ; } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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