cross page post

  • Thread starter Thread starter André Freitas
  • Start date Start date
A

André Freitas

I have a situation where i need to get some information in a database and
post this information (form method) to a normal asp page (for integration
purposes). The aspnet page, lets call it "mypage.aspx" ll just load the
data, and post it to "result.asp", theres nothing more, no buttons, nothing.
How can i do that? The result.asp (i cant upgrade it to aspnet) is in
another domain, but i think its not a problem, i just need to send a post to
there.

Regards,
André.
 
Place an ASP.NET Button control on mypage.aspx and set its PostBackURL
property to result.asp.

-Scott
 
So you think a good idea is to create all the text fields i need, load the
data from database and set to its fields, and then put a button with the
postbackurl to result.asp. I think it ll work.

Just one more thing? How can i automatic trigger the button?
 
If you are trying to do this automatically, why not just have the classic
asp page get the data directly and avoid the intermediate aspx page?

-Scott
 
I have no access to the asp page. Its in another server, in another company.

My users ll have a link to click, the link ll send the parameters (post
method) to the another company. The problem now its how can i do this
automatically, without the user being requested to click in another button
inside the aspnet page.

Regards,
André.
 
this is a simple page

<%@ Page Language="C#" %>
<script runat="server">
protected MyDatabaseRecord db;
protected override void OnLoad(EventArgs e)
{
db = loadDatabaseRecord();
}
.....
</script>
<html>
<body onload="document.forms[0].submit()">
<form method="post" action="othersiteurl">
<input type="hidden" name="field1" value="<%=db.Field1 %>"/>
<input type="hidden" name="field2" value="<%=db.Field2 %>"/>
<input type="hidden" name="field3" value="<%=db.Field3 %>"/>
<input type="submit" value="if this page does not auto redirect click
me" />
</form>
<body>
</html>
 
Back
Top