A query string parameter is a name-value pair in the query string of the URL of a certain web page. It can be used to manipulate the content on the page.
Questions tagged [querystringparameter]
180 questions
689
votes
33 answers
How to get URL parameter using jQuery or plain JavaScript?
I have seen lots of jQuery examples where parameter size and name are unknown.
My URL is only going to ever have 1 string:
http://example.com?sent=yes
I just want to detect:
Does sent exist?
Is it equal to "yes"?
LeBlaireau
- 14,709
- 30
- 95
- 169
424
votes
11 answers
How to pass an array within a query string?
Is there a standard way of passing an array through a query string?
To be clear, I have a query string with multiple values, one of which would be an array value. I want that query string value to be treated as an array- I don't want the array to…
Yarin
- 144,097
- 139
- 361
- 489
77
votes
4 answers
Build query string from parameters object
How to build a url with query parameters in Angularjs.
I see the API $location.search()
the problem is $location(url) is to redirect to the url. In my case, I want to pass a url and key:value pairs for the query params and build the url. something…
bsr
- 52,180
- 78
- 198
- 296
29
votes
3 answers
How to parse/read multiple parameters with restify framework for Node.JS
Scenario: We developer are trying to replace a web service (written in C#.Net) with Node.JS Restful API.
Issue: Now we need to handle the incoming request as is (we don't have control over it). So the following is the format of the incoming…
Amol M Kulkarni
- 19,000
- 32
- 110
- 158
23
votes
4 answers
Checking for null and missing query string parameters in PHP
I want to be able to distinguish between existing query string parameters set to null, and missing parameters. So the parts of the question are:
How do I check if a parameter exists in the query string
What's the established method for passing a…
Yarin
- 144,097
- 139
- 361
- 489
21
votes
3 answers
Django Admin Custom Change List Arguments: Override /?e=1
I'm trying to pass in a custom argument to the Django Admin change list view so I can filter the list in a specialized way. I'd like to filter the queryset on 2 fields, start_date and end_date, based on the GET parameter called 'active_pp'. I've…
Joe J
- 8,079
- 8
- 57
- 84
11
votes
3 answers
What is a valid URL query string?
What characters are allowed in an URL query string?
Do query strings have to follow a particular format?
Aran Mulholland
- 22,728
- 23
- 129
- 222
8
votes
2 answers
asp:QueryStringParameter and empty query string parameter
I haveasp:GridView displaying client requests using asp:SqlDataSource. I want to limit displayed information by client:
View.aspx has to display everything, View.aspx?client=1 has to display only requests from client ID #1.
So I'm using…
abatishchev
- 92,232
- 78
- 284
- 421
8
votes
4 answers
How to remove blank values params from query string
I have a search form, with lot of options, Submitted to a route with Get request. URL is something like this:
http://localhost:3000/restaurants/search?utf8=%E2%9C%93&city=&cuisine=&number_of_people=&query=hello
with lot more params. I want to make…
Mohit Jain
- 40,277
- 53
- 161
- 272
7
votes
4 answers
Remove null params in HttpParams
I have a criteria object for which some attributes can be null, if I don't do anything the query string include those like &p=undefined which is not desirable since at the WebApi these come as"null" instead of null
So given this in the Angular…
Anand
- 928
- 19
- 32
5
votes
2 answers
MySQL/PDO::quote(), Putting single quotes around integers
It appears no matter what value/data-type pair I pass to $pdo->quote($value, $type);, it always quotes it as a string:
echo $pdo->quote('foo', PDO::PARAM_STR); /* 'foo', as expected */
echo $pdo->quote(42, PDO::PARAM_INT); /* '42', expected 42…
Dan Lugg
- 18,516
- 18
- 99
- 168
5
votes
4 answers
Cast all keys in dictionary to uppercase
This is probably a very simple question but google has let me down sofar and keeps pointing me towards python solutions.
I have a webpage where applciations/users can supply querystringparameters.To Retrieve the querystring parameters I use the…
User999999
- 2,430
- 5
- 35
- 60
4
votes
3 answers
MVC 3 Reload current page with modified querystring values
Background:
I have an MVC layout (master) view which uses @Html.RenderAction to display a dropdown in the left side navigation panel. This dropdown will be displayed on all the pages of the site.
The dropdown is wrapped in a form element and on…
andytech
- 133
- 1
- 2
- 7
4
votes
2 answers
How to parse querystring parameter from URL in Fastify server?
I am a totally new to fastify but I have a fastify server running. I want to parse query string such as:
http://fake.com/?user=123&name=ali
I want to get "user" and "name" values from the URL above. My current code is like this:
fastify.route({
…
web-tasarimci
- 69
- 1
- 9
4
votes
1 answer
How should you build an OData URI?
I'm looking to build URIs such as https://example.com/data/customers?$top=100.
Is there a UriBuilder for creating OData URIs (i.e. which can handle characters such as $ appropriately)?
Full info
I have code like this (simplified example):
public Uri…
JohnLBevan
- 18,988
- 5
- 75
- 151