Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - How to post data w/o users
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to post data w/o users

 Post Reply Post Reply Page  12>
Author
Necronom View Drop Down
Groupie
Groupie


Joined: 19 October 2001
Location: United States
Status: Offline
Points: 116
Post Options Post Options   Thanks (0) Thanks(0)   Quote Necronom Quote  Post ReplyReply Direct Link To This Post Topic: How to post data w/o users
    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 .
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Eray View Drop Down
Newbie
Newbie


Joined: 28 March 2005
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote Eray Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Necronom View Drop Down
Groupie
Groupie


Joined: 19 October 2001
Location: United States
Status: Offline
Points: 116
Post Options Post Options   Thanks (0) Thanks(0)   Quote Necronom Quote  Post ReplyReply Direct Link To This Post 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 .

Edited by Necronom - 28 March 2005 at 4:07pm
Back to Top
pmormr View Drop Down
Senior Member
Senior Member


Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
Post Options Post Options   Thanks (0) Thanks(0)   Quote pmormr Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post Posted: 28 March 2005 at 9:29pm
especially as he is crossing servers....
Back to Top
Eray View Drop Down
Newbie
Newbie


Joined: 28 March 2005
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote Eray Quote  Post ReplyReply Direct Link To This Post 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.

Edited by Eray - 29 March 2005 at 12:59am
Back to Top
ub3rl337ch3ch View Drop Down
Senior Member
Senior Member
Avatar

Joined: 16 February 2005
Location: Australia
Status: Offline
Points: 341
Post Options Post Options   Thanks (0) Thanks(0)   Quote ub3rl337ch3ch Quote  Post ReplyReply Direct Link To This Post 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")%>
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.