|
-
June 20th, 2002, 02:57 AM
#1
ASP question?
how can i send a variable or a value using Response.Redirect to the redirected asp page...
Thanks
waqas
work, work and only work!!
-
June 20th, 2002, 07:47 AM
#2
This is a forum for client-side scripting 
You can pass variables in url, separated by question mark (?) and ampersands (&). httpString data can be accessed with Request(variable_name) method, likewise when processing form data.
For example :
Code:
<%
Response.redirect("http://www.domain.com/query.asp?age=22&gender=male")
%>
and query.asp,
either :
Code:
<script type="javascript">
var aVariables = location.search.substring(0).split();
// aVariables contains : { [0]: "age=22", [1]: "gender=male" }.
// eval() method helps us to bring values into variables age and gender
for (var iI=0;iI<aVariables.length;iI++)
{
eval(aVariables[iI]);
}
</script>
or :
Code:
<%
Dim age, gender
age = Request.Querystring("age")
gender = Request.Querystring("gender")
%>
Last edited by Zvona; July 2nd, 2002 at 01:53 AM.
Zvona - First aid for client-side web design
-
June 22nd, 2002, 12:37 PM
#3
work, work and only work!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|