Questions tagged [request.querystring]
201 questions
5
votes
2 answers
Why isn't FromQuery working in my ASP.Net Core 1.1 controller action
I am working on an ASP.Net Core 1.1 web API. I have a ServiceTypeCode controller as shown below;
[Produces("application/json")]
[Route("api/[controller]")]
public class ServiceTypeCodeController : Controller
{
...
...
...
…

EiEiGuy
- 1,447
- 5
- 18
- 32
5
votes
2 answers
How to check if an 'unknown' parameter is supplied in a Request's Query String?
For example, if a query string has 2 expected parameters , say. param1 = "abc" & param2 = "def".
I know that Request.QuerySring["abc"] will check for "abc" in query string.
But is there any way to validate if user enters anything else other than…

Manu
- 73
- 7
5
votes
1 answer
How to properly use a QueryString in .NET ASP C#?
I have a web form in .NET using ASP and C#. This form has a DropDownList control with its AutoPostBack property set to True.
Some data on the form is displayed when the user selects an item from the DropDownList.
Now, I want the user to be able to…

Pabinator
- 1,601
- 1
- 21
- 25
4
votes
2 answers
Serialize querystring as Json in C#- values don't show up, only the keys. Why?
I'm trying to serialize a querystring to JSON in C#. I'm not getting the results I expected, and am hoping someone can explain. Some reason I'm only getting the query "name" and not the "value".
//Sample Query:
…

Hairgami_Master
- 5,429
- 10
- 45
- 66
4
votes
4 answers
how to retrieve a querystring value from an .aspx page and pass it to ascx page
Is is possible to retrieve the ID value from the Request.QueryString from a aspx file and pass it onto a ascx file in order to successfully update a profile using the retrieved ID?

sac
- 53
- 1
- 1
- 4
4
votes
7 answers
Converting Request.QueryString to integer
How do i convert a Request.Query string to an integer value. I've tried all the Convert.ToInt32 and Int32.Parse but it says Input string is not in the correct format. I am using the string value as an input to a stored procedure which takes in only…
HeadScratcher
4
votes
1 answer
how to get query string parameters from url in aiohttp?
I tried to get query string parameters from url by using aiohttp, but this code does not work :
async def call_answer(request):
print("request", request)
params = request.rel_url.query
print("parameters +++++", params["call_id"])
…

Ali Najafi
- 127
- 1
- 2
- 5
4
votes
1 answer
Understanding HttpModules and URL manipulation
A project I'm working on integrates with a php app (Revive AdServer FWIW). We control the server it's deployed to, but altering the code I believe is out of the question. Revive has invocation javascript code you deploy to sites where you'd like…

mellis481
- 4,332
- 12
- 71
- 118
4
votes
1 answer
QueryString problems with "ÅÄÖ" letters
I am filling a textbox with values but for some reason "ÅÄÖ" letters converts to strange characters when I use QueryString. it happens only when I use QueryStringso the problem is not in my web config.
This is how it looks like:
this.txtNewName.Text…

Obsivus
- 8,231
- 13
- 52
- 97
4
votes
1 answer
Request.Querystring removes characters from encrypted text
In my application I take a user's e-mail address, encrypt it, and URLEncode it, and pass it along into a QueryString.
email = Server.UrlEncode(aes.Encrypt(email));
The landing page does a Request.Querystring["email"], UrlDecodes it, and then…

Jack Marchetti
- 15,536
- 14
- 81
- 117
4
votes
1 answer
How to pass the value from one asp page to another asp page using queryString?
How to pass the value from one asp.net page to another asp.net web page using queryString.It means test1.aspx and test2.aspx are two web pages.
In test1.aspx, i have the string value,
string abc="stackoverflow";
if i use like this…

V.V
- 875
- 3
- 25
- 54
3
votes
3 answers
How do you name your query string variables? Short or long? Why?
In our code we have query string variables with very short names such as cId, iId, isA and u. It is very hard to tell what this variables are from their names. I want to use more descriptive names such as customerId, itemId, isAnonymous and user.
I…

CleanCoder
- 807
- 1
- 9
- 19
3
votes
3 answers
Using Request.QueryString, slash (/) is added to the last querystring when it exists in the first querystring
this is my first post on stackoverlow and I couldn't find a solution to this in any other posts, so here it goes:
I have a web page that is sending two query strings in the url:
example.aspx?name=<%=name%>&sku=<%=sku%>
I then collect the values…

Zach
- 880
- 3
- 12
- 23
3
votes
2 answers
ASP.NET: Using Request["param"] versus using Request.QueryString["param"] or Request.Form["param"]
When accessing a form or query string value from code-behind in ASP.NET, what are the pros and cons of using, say:
// short way
string p = Request["param"];
instead of:
// long way
string p = Request.QueryString["param"]; // if it's in the query…

MGOwen
- 6,562
- 13
- 58
- 67
3
votes
2 answers
How to find not null variables from URL query string? or can we get the variable in URL query string from request in python
I want to filter data based on multiple fields in Django python. The scenario is, if a GET request to webserver comes as /searchStudent/?firstName=&lastName=xyzage=23&class=&city= and we dont know what can be the possible parameter in query string,…

MegaBytes
- 6,355
- 2
- 19
- 36