I accept a few user inputs and a file from the user, post it to my ASP page.
I'm able to receive the data as well as the file properly in Receiver.asp.
In my receiver.asp, I need to process the user inputs and subsequently POST
this data and the file again to a different server. I would like to use
ServerXMLHttp. Now, how do I simulate Form creation in receiver.asp.
I use the following code to post to the second server
MyXmlHttp.open "post", myTargetURL,false
MyXmlHttp.setRequestHeader "Content-Type", "multipart/form-data"
Now here's where I get stuck.
1) How do I construct the form data? How can I put together the data i
received (which is text) as well as the received file (which is Binary) in
the same Send statement for the Post? -- I assume that if HTML forms do it in
some format, I should be able to simulate the same through ASP, but how???
2) The received file will not be stored anywhere in my server. It has to
be forwarded in memory.
Should it look somewhat like the following?
MyXmlHttp.send ("userId=" & someUserId & "&privateLabelID=" & someLabel &
"&File=" & receivedBinaryFileInMemory)
Thanks in advance for any help 4 1784
Can you show the code in Receiver.asp so we can help you?
Sean
"Badri Narayanan" <Ba************@discussions.microsoft.com> wrote in
message news:69**********************************@microsof t.com... I accept a few user inputs and a file from the user, post it to my ASP page. I'm able to receive the data as well as the file properly in Receiver.asp. In my receiver.asp, I need to process the user inputs and subsequently POST this data and the file again to a different server. I would like to use ServerXMLHttp. Now, how do I simulate Form creation in receiver.asp.
I use the following code to post to the second server MyXmlHttp.open "post", myTargetURL,false MyXmlHttp.setRequestHeader "Content-Type", "multipart/form-data"
Now here's where I get stuck. 1) How do I construct the form data? How can I put together the data i received (which is text) as well as the received file (which is Binary) in the same Send statement for the Post? -- I assume that if HTML forms do it in some format, I should be able to simulate the same through ASP, but how???
2) The received file will not be stored anywhere in my server. It has to be forwarded in memory.
Should it look somewhat like the following? MyXmlHttp.send ("userId=" & someUserId & "&privateLabelID=" & someLabel & "&File=" & receivedBinaryFileInMemory)
Thanks in advance for any help
Sean... thanks for your time and interest. We've cracked it.
Badri
"Sean" <sn********@hotmail.com> wrote in message
news:RGM2e.859356$8l.658155@pd7tw1no... Can you show the code in Receiver.asp so we can help you?
Sean
"Badri Narayanan" <Ba************@discussions.microsoft.com> wrote in message news:69**********************************@microsof t.com...I accept a few user inputs and a file from the user, post it to my ASP page. I'm able to receive the data as well as the file properly in
Receiver.asp. In my receiver.asp, I need to process the user inputs and subsequently POST this data and the file again to a different server. I would like to use ServerXMLHttp. Now, how do I simulate Form creation in receiver.asp.
I use the following code to post to the second server MyXmlHttp.open "post", myTargetURL,false MyXmlHttp.setRequestHeader "Content-Type", "multipart/form-data"
Now here's where I get stuck. 1) How do I construct the form data? How can I put together the data i received (which is text) as well as the received file (which is Binary)
in the same Send statement for the Post? -- I assume that if HTML forms do
it in some format, I should be able to simulate the same through ASP, but
how??? 2) The received file will not be stored anywhere in my server. It has
to be forwarded in memory.
Should it look somewhat like the following? MyXmlHttp.send ("userId=" & someUserId & "&privateLabelID=" & someLabel
& "&File=" & receivedBinaryFileInMemory)
Thanks in advance for any help
<<
I accept a few user inputs and a file from the user, post it to my ASP
page.
I'm able to receive the data as well as the file properly in
Receiver.asp.
In my receiver.asp, I need to process the user inputs and subsequently
POST
this data and the file again to a different server.
To submit a form is a client-side thing to do.
You could have a page with a bunch of hidden fields filled with info
that immediately gets submitted with JavaScript like this toward the
bottom of the page:
<script type='text/javascript'>document.myform.submit();</script>
Best regards,
J. Paul Schmidt, Freelance ASP Web Developer http://www.Bullschmidt.com
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
*** Sent via Developersdex http://www.developersdex.com ***
Thanks for the reply...
As I have mentioned in my post, I need to process some data and the file
input by the user, add my own stuff to the form, and post it to a different
domain. The requirement is that all this processing has to happen at the
server side only. If it is only data (which is just text and no file
attached), this works to perfection using ServerXMLHttp . I was trying to
figure out how this can be achieved with data as well as an attached File in
the Form. The "file attachment" makes the entire Form data to be binary.
While I think I have worked out a solution, I think there are other issues
that I need to comprehend. I'm currently putting it all together
Thanks
Badri
"Bullschmidt" <pa**@bullschmidt.com-nospam> wrote in message
news:OH*************@TK2MSFTNGP12.phx.gbl... << I accept a few user inputs and a file from the user, post it to my ASP page. I'm able to receive the data as well as the file properly in Receiver.asp. In my receiver.asp, I need to process the user inputs and subsequently POST this data and the file again to a different server.
To submit a form is a client-side thing to do.
You could have a page with a bunch of hidden fields filled with info that immediately gets submitted with JavaScript like this toward the bottom of the page:
<script type='text/javascript'>document.myform.submit();</script>
Best regards, J. Paul Schmidt, Freelance ASP Web Developer http://www.Bullschmidt.com ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
*** Sent via Developersdex http://www.developersdex.com *** This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Aliandro |
last post by:
Hi I am really stuck and need some expertise help please.
I have an XML file:
<XML>
<USER_INFO>
<USERNAME>username</USERNAME>
<PASSWORD>password%</PASSWORD>
</USER_INFO>
<SITE_INFO>...
|
by: Vishal |
last post by:
Hello,
I already asked this question in the ASP.NET forums,
but no help came. So I am hoping that somebody can help me
out. This is really very URGENT me.
For my e-commerce application, I...
|
by: Miro |
last post by:
Im trying to store data as I would in some old language.
Old Example
//Create an array that holds 3 different variable types
TempArray := { { "Hello", 1, False }, { "Goodbye", 123, True } }
...
|
by: David Thielen |
last post by:
Hi;
I would like to display a page then immediately cause a post back (the 1st
page will have a big "working..." on it, then in the post back do my query
which will take a couple of seconds, and...
|
by: Laith Zraikat |
last post by:
I am trying to invoke a post request from code behind of an asp.net page
using "WebClient" object, and I want the user to be redirected to the action
url as well.
So far Ive been able to send...
|
by: Marc Castrechini |
last post by:
This is a classic double hop delegation issue, however its the first time we
are setting this up so we are doing something incorrectly. If we run
through the IDE or using a localhost path on the...
|
by: rup |
last post by:
Hello,
This is my first application on socket programming in vc++. I am facing
problem that how to make connection to server, & make GET/POST request
by HTTP.
Please help me. Its urgent.......
|
by: =?Utf-8?B?YzY3NjIyOA==?= |
last post by:
Hi all,
I cut and paste the following code from msdn help page which it just
introduces view and multiview server controls.
Here is what I do:
in vs studio 2005, File --New Web Site, it...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |