cross page post

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é.
 
S

Scott M.

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

-Scott
 
A

André Freitas

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?
 
S

Scott M.

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
 
A

André Freitas

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é.
 
B

bruce barker

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>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top