Collect String From HTTP Form POST
I have a basic form that POSTs data to a web server. The web server then replys with a string response. It goes something like this:
<FORM METHOD=POST ACTION="https://www.mywebserver.com/trans.dll">
<INPUT TYPE=HIDDEN NAME="x_Field1" VALUE="1">
<INPUT TYPE=HIDDEN NAME="x_Field2" VALUE="True">
<INPUT TYPE=HIDDEN NAME="x_Login" VALUE="MyUser">
<INPUT TYPE=SUBMIT VALUE="Click here To Submit">
</FORM>
The response is just a comma separated values string like:
1,0,2,3,0,Transaction Success,Etc
Once I hit the submit button the server returns a string response. I do not want the user to ever see the response, but need the response string to create my own page. How do I retreive that string and use it??
View Replies
ADVERTISEMENT
A co-worker of mine used to have a script that he would run after the
script on the page was executed, it would spit out the SQL of the
query that was dynamically created through all of the gibberish code
in the ASP page.
Does anyone know what exactly he was running?
View Replies
View Related
I'm developing an Asp.NET system to take a CSV file uploaded via the web, parse it, and insert the values into an SQL database. My sticking point comes when I try to split() the string returned by readline() on the file.
The following code snippet works for me:
tokens = "one,two,three,four".Split(",")
for each token in tokens
response.write("<td>"+token+"</td>")
next
However, if I take the next line in the CSV, read using StreamReader.ReadLine on the PostedFile.InputStream, I receive "Object reference not set to an instance of an object." which I have narrowed down to be my string holding the line. Further investigation reveals that no other string member functions work on my line (.ToCharArray, .ToString, etc).
I suspect that StreamReader.ReadLine is not correctly returning a string, even though Response.Write(line) displays what I would expect .....
View Replies
View Related
I created a form for users to sign up for a newsletter our site sends out. The thing is we use a third party that keeps a db of our subscribers and sends the email for us. The signup resides on our site and when the user submits they get poasted to this third party site and then click through and get refreshed to our site again.
We want change that process and keep the user on our site so now thier values need to get posted to the 3rd party behind the scenes. Code:
View Replies
View Related
i'm tring to send post data using
set objSrvHTTP = Server.CreateObject ("WinHTTP.WinHTTPRequest.5.1")
....
objSrvHTTP.send xmlstring
but the transfer rate is very low(4 min per MB on LAN)..
some ideas?
(with MSXML2.ServerXMLHTTP.4.0 is equal)
View Replies
View Related
i'm trying to find out how to post a file to a URL, using ASP, but I can't seem to track it down.
View Replies
View Related
I need to redirect to another web page, but that redirect will include the
submission of form data. So, unlike ServerXMLHTTP which stays on the
originating web page, I need the script to redirect to the page that I'm
submitting the POST data to (without pressing a submit button).
Any suggestions?
View Replies
View Related
if i use the example code belpw ; which ip address will the post appear to come from. the ipaddress of the browser or the webserver?
<%
Response.Buffer = True
Dim objXMLHTTP, xml
Set xml = Server.CreateObject("Microsoft.XMLHTTP")
' Notice the two changes in the next two lines:
xml.Open "POST", "http://www.imdb.com/Find", False
xml.Send "select=All&for=The Usual Suspects"
Response.Write xml.responseText
Set xml = Nothing
%>
which ip address will the post appear to come from. the ipaddress of the browser or the webserver?
View Replies
View Related
A site I'm working on has a php form with an asp form processor redirecting to a php thankyou page.
I need a way to output some of the form fields entries in the thankyou page.
Here's my ASP and vbscript: Code:
View Replies
View Related
i've got this code...
Dim oOriginalPO, oXMLHTTP, strFileName, strURL
strURL = "url that is required"
strFileName = sXML
Set oOriginalPO = CreateObject("MSXML2.DOMDocument")
Set oXMLHTTP = CreateObject("MSXML2.XMLHTTP")
oOriginalPO.async = False
oOriginalPO.load strFileName 'name of file containing cXML data
oXMLHTTP.open "POST", strURL, False 'strURL is our URL you post to
oXMLHTTP.send oOriginalPO
So on the assumption that the sXML variable has correct information inside it to send out, can anybody see why perhaps this code isn't working properly?
View Replies
View Related
Is is possible and if so would anyone have a brief example of submitting data from an ASP page to another server via HTTP, using a POST method. Essentially duplicating an HTML FORM.
Further details, if availalbe would be the use of username/password (basic) authentication and the HTTP connection is actually and HTTPS (SSL) connection.
View Replies
View Related
How do you append parameters to SQL string?
descrip = Request.Form("Description")
strSql = strSql & " AND [SaLTInventory].[Description] LIKE "&descrip
I don't seem to have it quite right?
View Replies
View Related
This is the scenario: I am making a wizard composed of several steps, each
step being a form with the post method. The first steps may be completed
whether the user is logged on to the website or not. But from a certain step
on the user must be logged on to complete the wizard. What I do is post the
data gathered so far to the logon page; the logon page is essentially an ASP
page with an HTML logon form that posts to itself. Once the user logs on he
is taken again to the wizard, to the step where he left off.
Right now I am using the HTML form / approach on the
logon page: after the user is authenticated, the asp page builds a form with
the "saved" data, pointing to the next step of the wizard, and uses the
onLoad event of the body tag to submit the form. And this does what I
intended.
But I believe there must be a more elegant way to do this, and I suspect it
involves setting headers directly using Response.AddHeader but I don't know
how to do it. Am I right? If so, how to do it?
View Replies
View Related
I have an asp page. There I enter some text. This text needs to go some other web site but as jsp page ( such as http://www.web.com/Link.jsp).
Now, I was told to submit my asp page as HTTP Post to their jsp page. This is completely a new thing for me to do. Code:
View Replies
View Related
Let's say if I want to send a http "Post" request to a url, and check the http status code later. How should I write the code? I have found example to use WinHttp to send "Get" request and check the http status code:
======
Set objWinHttp = CreateObject("WinHttp.WinHttpRequest.5")
objWinHttp.Open "GET", strURL
objWinHttp.Send
If objWinHttp.Status <> 200 Then
...
End If
======
How should I write the code if I need to use "POST" to send data in a form, and to check the http status code later?
View Replies
View Related
I am a beginner in ASP and i have the following question: Is it possible to add manually things to the string that the page will send to the other page?
In other words: Do i have to use Form items to add something to the string?
My idea is:
<%Form=Form+"?Hgeheim="werkt"%>
it doesn't work. If it is possible could you please give a example code?
View Replies
View Related
I was wondering if someone could help me with a formatting problem for ASP/SQL?
Is it possible to format a variable string from a textbox?
I'll try and make it more clear what i want, sorry.
I have a page with a textbox and submit button for users to input a postcode, which then searches a database for matching or similar postcodes.
This is the query i am using: Code:
View Replies
View Related
I have the following test.asp page which needs one parameter querystr
but my querystr is a very long string value. When I send a long value
the query string is getting truncated after some characters.
Can you please kindly share the code segment to workaround how to pass
such a long string value to a asp page. This is how I invoke the test
page:
http://localhost/?querystr=select ............ from xxxxx
'test.asp
<html>
<body>
<%
response.write("Hello World!")
w=request.querystring("querystr")
response.write "<td><p></td>" & w
%>
</body>
</html>
but part of my query string never gets passed to the asp page appears
asp as a limitation on max string length can you please provide me a
workaround how I can overcome and pass the right string to asp.
View Replies
View Related
I've seen something on my logs that's not supposed to happen.pagea.htm has a form with a Select list called country as below:
<select name='Country' size='1'>
<option value='USA'>USA</option>
<option value='Canada'>Canada</option>
'lots more countries...
</select>
Page B has code that references request.form("country"),and assumes that this field is nonempty as it is coming from a select list.I saw an error caused by an empty string in this country variable
The User agent was IE6, and the pages appeared in the correct order in the IIS logs.pagea.htm (the page with the form) was requested with a GET method about a minute before the POST to pageb.asp, and no intervening pages were requested by that IP I would suspect AOL wierdness, but it's not an AOL IP.
View Replies
View Related
I've always been able to find my answer in other posts. Which leads me to wonder if what I want to do can be achieved?
I need an xml object to post a form on my site without a user having to click submit.
The form it will be submitting will always be submitting to 1 specific page. The form element it submits will be a different string every time. When the form is fired off it will search for this string in the code of the page it has been sent to and then return to me whether it was found or not.
View Replies
View Related
When I do testing with a test post page, everything functions properly. When
the actual customer does the post, the attribute following the "file"
attribute is concatenated to the file itself. When I execute the
HttpPostedFile.SaveAs(), the resulting file is what is sent Plus the
following form attribute. This following attribute is not in any Collection
from the Request object. Code:
View Replies
View Related
Basically, I have a dataset I need to send to a vendors site. They
have a page that will accept from form posts. What I'm trying to
figure out is how to loop through and submit form data when I do not
have control of the end site.
My basic idea is to have a page that will cycle through the dataset
put into invisible form fields and submit to the site (many times
over). Is this possible through asp?
View Replies
View Related
We have created a new ASP file that will process a standard HTML form, write the data submitted in the form to a database table, and send us an email of the data submitted. All works OK except if we now send that form code as part of an email, the form appears OK at the receiver's end, but when you fill in the form, there is no data that is transmitted back to the asp file.
The ASP file acknowledges the receipt of the form, and all that, but there is no data in the email and no data in the table.
It is obviously something that is happening when it is sent as an email, but I have seen this sort of thing done before, with a form in an email, and I wonder if anyone has some clues as to what we need to do to make the form work properly when sent as an HTML email.
View Replies
View Related
Could someone please remind me how to get all the form variables in a post?
View Replies
View Related
Alright, I have a form that needs to post to form_process.asp
However, it also needs to post to another site/, say example.com/process.asp
How would I do this?
The place it needs to post to is off site, and MY form_process.asp needs to save the data before submitting it to example.com/process.asp
Possible?
View Replies
View Related
This has got to be easy, but I don't know how to do it. I have a form with an action="email.asp" I have a submitt button that when pressed submitts the form and goes to email.asp.
I want to add another button that when pushed submits it to another page, say print.asp
How is that done?
View Replies
View Related
I have problem getting right info using array.
When I post data with form:
<% i = 1 %>
<input type="text" name="Boys(<%=i%>)">
and retrieving the data on another page:
<%
i = 1
Response.Write Request.Form("Boys(i)")
%>
I do not see the data. If I replaced "Boys(i)" with "Boys
(1)", I can see the data. What am I missing?
View Replies
View Related
I have a comments form that when filled in posts the comments from a text field into a database.Due to a bit of duff coding (Doh!) the database was not getting updated and i lost 50 or so posts worth ofcomments.
Is there any way of retrieving the posted forms from theserver?The form uses the post method, with asp doing the work.
View Replies
View Related
I have form1.asp which contains a form which is posted to and processed by a page called process.asp.I want to create a second form on form2.asp and also post it to process.asp. On process.asp I would execute different stored procedures conditionally based on where the form is submitted from.How can I tell which page the form is submitted from?
I think I should be able to have a hidden form field on my forms and post that to process.asp.Is there a better or preferred method.?Can I combine these three pages on one asp page?
View Replies
View Related
I am posting a form variable to an ASP script, but when the asp script receives the variable, I don't want it to open a new web page or open in the same window. I also can't have the script on the same page and refresh the page.
I use javascript to submit the form with the hidden field, and I want the variable to be processed by the asp script in the background on the server and return nothing. So essentially, i want the script to run transparently. How can I do this with asp? We run a classic environment.
I am doing this because the script is a tracking script, and it's disruptive for the user to see any trace of it. I want them to continue surfing as normal.
View Replies
View Related
How do I simulate this from the server side:
<form name="SearchForm" method="POST" id="SearchForm"
action="http://SOMEURL/Search.ASP?Parm1=1&Parm2=2">
I have generally been posting data using:
Set xml = Server.CreateObject("Microsoft.XMLHTTP")
xml.Open "POST","http://SOMEURL/Search.asp?" & strParmList, False
xml.Send
The above is fine for passing URL parameters, but I need to simulate it coming from a form which has a name. How do I pass the form name which is used at the posted URL?
View Replies
View Related
Does anybody have the syntax to post form data to a CSV file? On submit, my form page will post to another asp page that will actually handle the data being dumped to a CSV file. I just can't seem to find the correct ASP syntax for this.
View Replies
View Related
Is it possible to POST a FORM to multiple URLS at the same time OR Is the only workaround for this scenario to use response.redirect in the called ASP page and do a multi processing?
View Replies
View Related