Hi,
You can generate this code, but it won't really work on the client-side, unless you're actually imitating .NET's System.Web.HttpContext class. If you are (and I think not) - you can use this:
HttpContext.Current.Request.QueryString["name"];
Otherwise, I would recommend that you parse the query string on the client side - using:
var s = HtmlContext.window.location.search;
You will need to parse this from a string to an object in order to find values by name: Like in this code snippet:
Hope that helps.