asp.net do a postback on page load
how do i code an aspx.page that does a post to an external site on pag开发者_如何学Goe load?
Example:
<form action="https://demo.demopage.net/" method="post">
<input type="hidden" name="lang" value="de" />
</form>
My intention is to open opener.aspx
in a target=_blank
. Opener.aspx will do a postback
to the above form.
thx for your help...
It's not a "postback" so much as it is a standard HTTP POST request. ASP.NET probably isn't necessary. How about something like this (using jQuery)...
<form id="someForm" action="https://demo.demopage.net/" method="post">
...
</form>
and
$(document)ready(function() {
$('#someForm').submit();
});
You can use server side http post: HttpWebRequest, HttpWebResponse
精彩评论