How do I transfer a value from a Querystring (codebehind) to a JavaScript function?

A

aaa

I'm a little baffled on how I transfer a value from a Querystring in code
behind and then transfer it to a javascript function. Any help is
appreciated.
 
K

KMILO

Please be more expecific, what do you need to do? Transfer a querystring value to javascript and generate a postback or make available the value to js without postback!!!

Cheers

KMILO.
 
A

aaa

both.

Please be more expecific, what do you need to do? Transfer a querystring
value to javascript and generate a postback or make available the value to
js without postback!!!

Cheers

KMILO.
 
K

KMILO

Hello Again,

Sorry for the late answer :) I wasnt in the office the last few days.

Heres a way to do what you want:
this.Page.RegisterClientScriptBlock("variables","<script>VARIABLE=\""+ this.Page.Request.QueryString["VARIABLENAME"] + "\";</script>");
this script will be registered in the next postback and the following thing to do is make a direct reference of the variable into your js code!!

If you want a pure client side querystring check this url: https://lists.latech.edu/pipermail/javascript/2003-February/004828.html

Cheers

KMILO
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,143
Messages
2,570,822
Members
47,368
Latest member
michaelsmithh

Latest Threads

Top