how can i send a variable or a value using Response.Redirect to the redirected asp page...
Thanks
waqas
Printable View
how can i send a variable or a value using Response.Redirect to the redirected asp page...
Thanks
waqas
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 :
and query.asp,Code:<%
Response.redirect("http://www.domain.com/query.asp?age=22&gender=male")
%>
either :
or :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>
Code:
<%
Dim age, gender
age = Request.Querystring("age")
gender = Request.Querystring("gender")
%>
Thanks Zvona