The thing is that you cannot just communicate with Server-Side using JS, JS is a client side, so you won't get the variables that you created in ServerSide.
To get them, you'll require:
<%= write_the_thing_here %>
For your code, you'll write:
string someThing = "<%= HttpUtility.HtmlEncode(Request.QueryString[0]) %>";
// now use this someThing in the document..you can use var instead of string
// but not them both..
document.getElementById(someThing);
// note the semicolon on the end, to close it..
You should not use string var because they are the data types in JavaScript as well as ASP.NET, so code might get puzzled thinking what the hell is this.
Instead of this, you can also try to write a hidden input field as
<input type="hidden" name="someThing" value="@Request.QueryString[0]" />
Then use it to do what ever you want to do dynamically. This might be the easy way of doing this, if you really want to use the ID from the server.
Sorry about the jQuery buddy:
var someThinge = $('input[type="hidden"]').val();
And then, continue your work!
Help note by Alexei Levenkov: semicolons in JavaScript are optional. They main use is to distinguish if code written by obfuscators/minimizers (tools or people) or normal developers :)
varis a Javascript keyword - change it tomyVar, or something meaningful.