在允许用户向多个供应商签字时,我试图执行单一签字。 每个供应商必须证明,必须作为形式员额发送。 我将这一举动说成是“HTTPR”问题,并将反应重新纳入以下法典。
private static string PostDataToServerAndGetResponse()
{
Uri uri = new Uri("http://www.amazon.com/exec/obidos/search-handle-form/102-5194535-6807312");
string data = "field-keywords=ASP.NET 2.0";
if (uri.Scheme == Uri.UriSchemeHttp)
{
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(uri);
request.Method = WebRequestMethods.Http.Post;
request.ContentLength = data.Length;
request.ContentType = "application/x-www-form-urlencoded";
StreamWriter writer = new StreamWriter(request.GetRequestStream());
writer.Write(data);
writer.Close();
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
StreamReader reader = new StreamReader(response.GetResponseStream());
string tmp = reader.ReadToEnd();
response.Close();
//return response.ResponseUri.AbsoluteUri;
return tmp;
}
return null;
}
退还价值——奖状是一种超声波,我想显示为一机。 我可以这样做,在地块上增加利器控制,并将案文财产确定为上述功能所返还的价值。
<iframe id="myIFrame" runat="server" height="700" width="950" frameborder="0" />
<asp:Literal ID="litFrame" runat="server" Mode="PassThrough" />
</iframe>
litFrame.Text = SAML.PostDataToServerAndGetResponse();
The above code dispaly the page fine, but when i click on any of the links it opens a new page.
There is no apparent framebusting java script, because if I set the src attribute of the iframe to response.ResponseUri.AbsoluteUri, all the clicks and page refreshes stay in the frame.
What I want to achieve
Display the Result of the post into Iframe and all the user to perform any clicks. Condition: Clicks in the frame should refresh the frame and not jump out to a new page.