> What does the code for converting a client side variable to a server side variable look like?<BR><BR>It looks like "posting" the value via a form or querystring and then picking it up, ON THE NEXT PAGE, via Request.Form or Request.QueryString.<BR><BR>
This is true, but what if you want to convert the client to a server variable on the same page. Example: I have a client side variable from the user and need to query a DB using that variable. I need to convert the client variable to a server variable to use it in the DB query (on the same page). After my query is complete I "post" the rest of the info and then go to the next page.
You can't do it.<BR><BR>I say again: You cannot access info on the server from code in the client. Period.<BR><BR>You *must* post the info to the server. Now, you *can* post to the SAME PAGE, but that will cause the same page to be sent back to the browser. So you have to be careful about how you arrange your code. "IF I am reposting THEN don't send the same stuff back" type of code.<BR><BR>There is one way to do *something* like what you are asking: Remote Scripting. It's tough. It's a pain in the next to use. Visit msdn.microsoft.com/scripting and click on the "Remote Scripting" link. Be prepared to spend a *lot* of time deciphering what they are talking about.<BR><BR>But I still say the short answer is the right one, for all practical purposes: You can NOT do it.<BR><BR>
...if you got Remote Scripting to work first time, I hereby bow down before you!<BR><BR>It took me at least two or three major stabs to get it to work for me. Wow.<BR><BR>Congratulations. Glad I suggested the right answer, even if I didn't think you were going to use it.<BR><BR>Bill<BR><BR>