Hi Gary, are u there (Urgent)

Results 1 to 3 of 3

Thread: Hi Gary, are u there (Urgent)

  1. #1
    Nandu Guest

    Default Hi Gary, are u there (Urgent)

    Hi Gary,<BR><BR>Saw your solutions in the aspfree.com regarding sending a file to a URL. I have a similar requirement. Can you please help me.<BR><BR>I too have to send the data from a form to a URL in the form of a text file. Now my problem is that the server program is not in my control. (It is of a different firm.) I can use my server (if required.) Now how do I collect the data from the form, convert that to a text file, and send it to a URL in the form of a text file (URL server is not in my control.) <BR><BR>Can you please help me to sort out this.<BR><BR>regards,<BR><BR>Nandu.<BR>nandu@techi e.com<BR>

  2. #2
    Nanda Guest

    Default And Gary, the URL has to send a message to browse

    Hi Gary,<BR><BR>I guess the File can only send from the client side, because the URL has to send back a mesage to the browser.<BR><BR>regards,<BR><BR>Nanda

  3. #3
    Join Date
    Dec 1969

    Default RE: And Gary, the URL has to send a message to br

    Nanda<BR><BR>This is a simple operation:<BR><BR>The code that assembles the text file:<BR><BR>&#039First create a string that represents the destination url<BR>strTemp= "http://www.someasppage.asp?"<BR><BR><BR>&#039Next Append the data from you form<BR>strTemp= strTemp + Request.Form("MyDataAsString")<BR><BR>&#039Then Encode the string data ie replace spaces and crlf<BR>&#039Note that the escape function will take a string and transform it into the unicode format.<BR>escape(strTemp)<BR><BR>&#039Next send the file to the other server<BR>Set ic = Server.CreateObject("InetCtls.Inet")<BR>ic.Request TimeOut=20<BR>ic.URL = strTemp<BR>Dim rst<BR>strReturn = ic.OpenURL<BR><BR><BR>Hope this helped.<BR><BR>mailto:gary@sanwire.com<BR><BR>PS Note the use of the InetCtls this will allow you continue running the code on your page, if you want to you can just replace all the InetCtls Object code with a:<BR><BR>Response.Redirect strTemp<BR><BR>But the users browser will go to the destination server.<BR><BR>PPS this method is good for max of 100k of data, if you need to exceed this amount of data you have a more serious problem.<BR><BR>PPPS This code can be used on the server side and the response will be sent to the client side, when you use the Response.Redirect strTemp &#039Method<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts