query-string

Is converting a NameValueCollection to a querystring using a c# lamdba efficient?

In researching how to convert a NameValueCollection to a querystring, I have come across different methods. I am curious if the shorter lambda syntax is as efficient as it could be. How to convert NameValueCollection to a (Query) String using a iterating function. public static String ConstructQueryString(NameValueCollection parameter...

Convert querstring parameter to javascript date object fails - NaN

I am trying to convert a querystring value into Javascript date object and then converting it into ISO Date format. I have three button - one extracts the querystring and displays the value - works properly Second, uses first function to extract querystring (works) and then converts to Date - fails - get NaN Third, passes a hardcoded st...

querystring encoding of a javascript object

Do you know a fast and simple way to encode a javascript object into a string that I can pass via GET? No jQuery, no other frameworks, just plain Javascript :) ...

Checking querystring values in PHP

http://localhost/?area=characters&amp;name=Michal+Stroganof $result = mysql_query("SELECT * from players WHERE name = '$_GET[name]'"); while ($row = mysql_fetch_assoc($result)) { echo "Name: " .$row['name']. "<br>"; echo "Level: " .$row['level']. "<br>"; } This is all code of my characters.php If the get variable "name" ...

ASP.NET: URI handling

I'm writing a method which, let's say, given 1 and hello should return http://something.com/?something=1&amp;hello=en. I could hack this together pretty easily, but what abstraction functionality does ASP.NET 3.5 provide for building URIs? I'd like something like: URI uri = new URI("~/Hello.aspx"); // E.g. ResolveUrl is used here uri....

Nginx 301 redirect inc. set cookie

Hi, what I'm looking for is the ability for nginx to detect that a url has the query string variable cid. for example www.adomain.com/froggy?cid=12&as=false (query string can be solo or mixed with others and cid is not necessarily the first variable in the query string) If cid is detected, it must send out a set cookie header with the ...

DataPager querystringfield problem?

Hello All, I am having trouble with used of the querystringfield property. I have a server control button which doing the postback when someone clicked it. The Datapager uses the querystringfield property to enable it to use the normal html linking tags. When I typed some search text and clicked the search button, the datapager's link...

Adobe query string encoding

I am passing a parameter to and Adobe flex application and am passing a large encrypted token from html to the swf as a query string like parameter (as is thin given method) This is being encoded somehow, for example + is gettting replaced with an empty space, but it is not your basic escape, unescape url encoding. I could try to encod...

Query string with slashes "/" not working in asp.net mvc?

Hello guys, I have a special case here: My action method accepts one parameter, this parameter is expected to be a full url (e.g. http://www.somesite.com/article/onesite?hello=whatever&amp;etc=blah). When working with old asp.net (oh, excuse me guys, I mean web forms) this works just fine, but when using asp.net mvc and preparing the r...

Maintain the querystring in all pages in mvc

I need to maintain the querystring in all pages in my asp.net mvc(C#) application. For ex.: I will call a page www.example.com?Preview=True. The querystring should be maintained whatever the page i click in www.example.com. i.e. When i click About us page in www.example.com, the url should be www.example.com/AboutUs?Preview=True How c...

query strings - use row ids or human readable values?

Building a form, I'm wondering if there is any significant advantage to having the query string show values in a more human readable format. example index.php?user=ted&location=newyork&...and so on rather than index.php?user=23423&location=34645&... and so on On the one hand, having the query string a little more readable allows the ...

URL requests adding POST data to querystring

I am using ExtJS to send an Ajax request to a PHP page on a server, wanting to send the parameters as POST variables rather than in the querystring. I have included a random token in the querystring since we were having caching issues on one of our proxy servers. Ext.Ajax.request({ url: 'ajax.php?action=test&randToken=' + generateRando...

Is using URL query string variables still RESTful

I'm presented with a problem of using query string variables in a RESTful Asp.net MVC application. Does that violate the RESTful pattern? The thing is that Asp.net MVC uses default route like: /controller/action/id I have to pass through another controller+action combination like: /controller/action/id/controllerX/actionX but this...

Passing Lists as a QueryString - should I use JSON

Lets say I've got an online dating site, users can filter the user list based on various criteria, Height, Age, BodyType, Ethnic Origin.... I want to pass the criteria to the pager, via QueryString. Height and Age are easy as these are ranges, and I would use MinHeight=3&MaxHeight=12&MinAge=21&MaxAge=30 However other Criteria like...

ASP.NET MVC Passing Lists to RouteData QueryString

The recommended approach for passing lists of values as a QueryString is www.site.com/search?value=1&value=2&value=3&value=4 ASP.NET handles this well: string value = QueryString.Get("value"); // returns "1,2,3,4" But I can't figure out a way of passing these values by into RouteData. The obvious approach would be to add int[] v...

How do i use a standard Query String + a Rewriter Route in Zend Framework

I have ZF app that is utilizing a legacy Javascript at for some functionality. In order for this app to work i need to pass it a standard query string. So how can i use a standard Zend Route with a query string on it? for example: domain.com/my/routing/rule?legacyparm1=value&legacyparam2=value It is not possible at this time to rewrit...

Apache mod-rewrite redirect domain name using querystring

We have a client who has many branches around the UK. Some of their branches have their own sites with their own domain names. The client has a part built system where visiting: www.client.com/aboutus.php?id=branchId shows the About Us page for that particular branch. What I need is a way to map specific domains to their branchId (thi...

How to retrieve the querystring in a Silverlight class library?

I'm Buiding a Silverlight 3 class library that needs to get a hold of the querystring. Now I know that in a SilverLight app, you can get a hold of it via the HtmlPage class. This doesn't work for a Silverlight class library. In a class library used in ASP.NET you could get hold of the current context through HttpContext.Current. Does Sil...

Regular expression to remove one parameter from query string

I'm looking for a regular expression to remove a single parameter from a query string, and I want to do it in a single regular expression if possible. Say I want to remove the foo parameter. Right now I use this: /&?foo\=[^&]+/ That works as long as foo is not the first parameter in the query string. If it is, then my new query stri...

Best practice for building a "Narrow your results" product filtering feature

I'm building a "Narrow your results by" feature similar to Best Buy's and NewEgg's. What is the best practice for storing the user's filter selections in a URL that can be shared/bookmarked? The obvious choice is to simply keep all the user's selections in the query string. However, both of these examples are doing something far more c...