954,600 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

setting variable using url

this seems to be a very simple problem, but i just can't get it done.

how do i set a variable which is to display url response?
let's say my request is "http://domain.com/datavalue.htm".
the request returns some value ( let's say "30.0" ) when i use it with browser.

now, i want to get that value dynamically using vbscript or asp object
and put that 30.0 on my webpage.
how do i do it?

akoloff
Newbie Poster
17 posts since Jan 2005
Reputation Points: 10
Solved Threads: 0
 

I'm not sure excatly what you're trying to do.
But if you want to display the result of an evaluation of a user input one way to do it is (in the example below the data to evaluate is sent from a form element):


Form action asp file :

dim var_name
var_name = request.form("form_field_name") '+ some evaluation'
response.write var_name

Or you could:

Form action asp file:

dim var_name
var_name = request.form("form_field_name") '+ some evaluation'
response.redirect "page_to_display_the_data.asp?responsenumber=" & var_name


Asp file to display the result:

response.write request.querystring("responsenumber")
madmital
Junior Poster
120 posts since Jun 2005
Reputation Points: 10
Solved Threads: 5
 

thats complicated but works. (the run around). url variables are in :

domain/page_name.extention?variable_name=variable_value

come to think of it this is also complicated!

to show the variable use <%= request.querystring("variable_name")%>

william_stam
Junior Poster
131 posts since Mar 2005
Reputation Points: 10
Solved Threads: 2
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You