Print Page | Close Window

How to post data w/o users

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=14457
Printed Date: 30 March 2026 at 11:30am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: How to post data w/o users
Posted By: Necronom
Subject: How to post data w/o users
Date Posted: 28 March 2005 at 3:02pm
how I can post data from an ASP page to another without user interaction?

I'm trying to have a user submit a form from page1.asp to page2.asp, and then in page2.asp I want it to post the data to page3.asp on another server automatically. Kinda like Response.Redirect, but I want it to pass data, and not in a QueryString.

Thanks!

. necronom .

-------------
http://www.BodyMod.org - Body Modification Organization



Replies:
Posted By: michael
Date Posted: 28 March 2005 at 3:49pm
you will have to put the data somewhere where both servers can get to it. Use SQL Server or create a webservice on the other server and post it that way.

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: Eray
Date Posted: 28 March 2005 at 4:02pm
Hidden fields with a Request.Form("VarNameHere") value attached to it could work.

BUT the user has to press the submit button, and I can't find any ASP code to change that, you could try JavaScript(google told me that it can be done) or, if SQL is to much for you (if) you could try writing to a .txt file, and read it from there in the next page.


Posted By: Necronom
Date Posted: 28 March 2005 at 4:03pm
Let me clarify:

page1:

<form action="page2.asp" method="post">
<input name="username" type="text">
<submit value="submit>
</form>

* User clicks on submit and is sent to page2.asp *

page2:

<%
strUsername = Request("username")
...
' open data base WHERE fldUsername = '" & strUsername
strDogsName = rsUsers("fldDogsName")
...
' This is the area I'm looking for (This code is ficticious)
Set FormDate=(FormPosting.Object)
strURL2Post2 = http://www.someserver.com/page3.asp

' Post data strDogsName to strURL2Post2
FormData.Post(strDogsName,strURL2Post2)
%>

* User does nothing and is sent to page3.asp *


page3:

strFavoriteDogsName = Request.Form("strDogsName")
Response.Write("Their favorite dog's name is " & strFavoriteDogsName)

* User arrives at page3.asp without seeing page2.asp *

TIA!

. necronom .

-------------
http://www.BodyMod.org - Body Modification Organization


Posted By: pmormr
Date Posted: 28 March 2005 at 8:50pm
you could temporially create a small text file that the other server would copy and then delete... but that could cause some security concerns

-------------
Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/


Posted By: michael
Date Posted: 28 March 2005 at 9:29pm
especially as he is crossing servers....

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: Eray
Date Posted: 29 March 2005 at 12:58am
I agree that creating a simple table within in a DB and use SQL to update a specific record would be the best course of action.


Posted By: ub3rl337ch3ch
Date Posted: 29 March 2005 at 6:51pm
use js to do this...
 
<SCRIPT language="JavaScript">
  document.myform.submit()
</SCRIPT>
 
that will automatically post the form called myform.
 
if you want to post the data that has already been posted from page1, just recreate the form on page2, but with all hidden fields and the values as <%= request.form("thefield")%>


Posted By: Necronom
Date Posted: 30 March 2005 at 3:36pm
Thank you!

I also found a component (ASPhttp) that does exactly what I was looking for. Just in case anyone else needed it =)

. necronom .

-------------
http://www.BodyMod.org - Body Modification Organization



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net