服务器之间,远程传输一些数据(不经过URL)
Code
1Protected Class RemotePostClass RemotePost
2
3 Public Url As String = "http://www.sss.com/"
4 Public Method As String = "post"
5 Public FormName As String = "form1"
6 Public paybill As String = "payment_amount"
7
8 Public Sub Post()Sub Post(ByVal output As Double)
9 System.Web.HttpContext.Current.Response.Clear()
10 System.Web.HttpContext.Current.Response.Write("<html><head>")
11 System.Web.HttpContext.Current.Response.Write(String.Format("</head><body><body onload=""document.{0}.submit()""><br/><br/><br/><br/><br/><br/><br/>", FormName))
12 System.Web.HttpContext.Current.Response.Write("<p align=""center"" style=""font-size: 24px""><embed src = ""images/test.swf"" width = ""100"" height = ""100"" allowscriptaccess = ""always"" allowfullscreen = ""true"" /><br/>Please wait while, we process your details</p>")
13 System.Web.HttpContext.Current.Response.Write(String.Format("<form name=""{0}"" method=""{1}"" action=""{2}"">", FormName, Method, Url))
14 System.Web.HttpContext.Current.Response.Write(String.Format("<input name=""{0}"" type=""hidden"" value=""{1}"">", paybill , output))
15 System.Web.HttpContext.Current.Response.Write("</form>")
16 System.Web.HttpContext.Current.Response.Write("</body></html>")
17 System.Web.HttpContext.Current.Response.End()
18 End Sub
19End Class
1Protected Class RemotePostClass RemotePost
2
3 Public Url As String = "http://www.sss.com/"
4 Public Method As String = "post"
5 Public FormName As String = "form1"
6 Public paybill As String = "payment_amount"
7
8 Public Sub Post()Sub Post(ByVal output As Double)
9 System.Web.HttpContext.Current.Response.Clear()
10 System.Web.HttpContext.Current.Response.Write("<html><head>")
11 System.Web.HttpContext.Current.Response.Write(String.Format("</head><body><body onload=""document.{0}.submit()""><br/><br/><br/><br/><br/><br/><br/>", FormName))
12 System.Web.HttpContext.Current.Response.Write("<p align=""center"" style=""font-size: 24px""><embed src = ""images/test.swf"" width = ""100"" height = ""100"" allowscriptaccess = ""always"" allowfullscreen = ""true"" /><br/>Please wait while, we process your details</p>")
13 System.Web.HttpContext.Current.Response.Write(String.Format("<form name=""{0}"" method=""{1}"" action=""{2}"">", FormName, Method, Url))
14 System.Web.HttpContext.Current.Response.Write(String.Format("<input name=""{0}"" type=""hidden"" value=""{1}"">", paybill , output))
15 System.Web.HttpContext.Current.Response.Write("</form>")
16 System.Web.HttpContext.Current.Response.Write("</body></html>")
17 System.Web.HttpContext.Current.Response.End()
18 End Sub
19End Class