Questions tagged [request.querystring]

201 questions
3
votes
2 answers

Request.Querystring(variablevalue) possible?

I'm creating an application which uses request.querystring to transfer variables between pages. However at the moment I am setting variable names in the URL dynamically in accordance with an array and I want to retrieve these values on another page…
howdybaby
  • 287
  • 1
  • 4
  • 15
3
votes
2 answers

Request.QueryString with "&" within it

I am trying to read a querystring and then use this to run a query and display the results for that variable. Very simple. Unfortunately some of the names have special characters within them and as a result I am not using the full name when running…
Barry
  • 63
  • 7
3
votes
1 answer

GET with hyphens raises error 403

I have a PHP script which handles callbacks from a payment processor. If the querystring 'result' contains double dashes followed by a single, we are getting a 403, e.g. /index.php?result=A--B- (returns 403) /index.php?result=A-B- (is…
3
votes
2 answers

QueryString not accepting & - Needs to

I need to be able to handle an HTML encoded ampersand in my .Net code. So the Url is http://myite.com/index.aspx?language=en&Refresh=true There is no way of changing this as it has been generated by something else so this is out of my…
Stuart Dobson
  • 3,001
  • 4
  • 35
  • 37
3
votes
2 answers

Is it possible to skip a HttpHandler if there is no querystring?

I wrote a dynamic image resizer as a HttpHandler. It's automatically called on anything with an image extension, so for example: http://www.mysite.com/picture.jpg?width=200&height=100 will run the handler and return a thumbnail image with the proper…
Daniel T.
  • 37,212
  • 36
  • 139
  • 206
2
votes
3 answers

ASP.NET QueryString without equals sign

When I have a url like: http://www.mysite.com/?MyTest= MyTest shows up as a key in the querystring of the request object. If I remove the = sign like: http://www.mysite.com/?MyTest It no longer shows up in the querystring keys (or AllKeys if you…
Mike Cheel
  • 12,626
  • 10
  • 72
  • 101
2
votes
1 answer

Multiple values of a querystring parameter that contain commas C#

I have an issue in ASP.Net when trying to interrogate the query string for values when the parameter name is the same, and the values of that parameter contains commas. For Instance, suppose I have a URL that reads as…
Karl
  • 912
  • 2
  • 16
  • 28
2
votes
1 answer

Request.QueryString not working in _Layout.cshtml in MVC3

I've run into an odd problem with MVC3 - If I try and use Request.QueryString["bookID"] in my _Layout.cshtml file, it always returns an empty string. If I move this into any of the pages that inherit this page, it works fine. Most of the problems…
boolean
  • 891
  • 2
  • 14
  • 23
2
votes
1 answer

how can i pass a "&" into a querystring value

i have a link in my app with the following URL: http://www.mysite.com/test?group=MyGroup the issue is one of the groups is called Group A & B when i try this and parse it on the serverside (through Request.QueryString["Group"]) …
leora
  • 188,729
  • 360
  • 878
  • 1,366
2
votes
7 answers

CustomerId and Request.QueryString in ASP.NET

Request.QueryString is not very safe. Incase someone is logged in. Just by typing in the URL myaccount.aspx?custId=10 One can get the information of another Customer. So its not safe at all. The reason for posting this was because, I wanted an…
user478636
  • 3,304
  • 15
  • 49
  • 76
2
votes
1 answer

Multiple types in query string in nodejs

I am creating a get api in nodejs.I am requesting the following url http://localhost:8080/api?id=20&condition1=true&arr=[{prop1:1}]&obj={a:1,b:2} And I am getting the request query object as follows- req.query = { arr:"[{prop1:1}]", …
Komal Bansal
  • 789
  • 2
  • 7
  • 20
2
votes
6 answers

Object reference not set to an instance of an object

When I try to open the page from my IDE in VS 2008 using "VIEW IN BROWSER" option I get "Object reference not set to an instance of an object" error. The piece of code I get this error : XResult = Request.QueryString["res"]; TextBox1.Text =…
BumbleBee
  • 10,429
  • 20
  • 78
  • 123
2
votes
1 answer

How can I stop asp.net from re-appending querystrings on form post back?

I am developing a simple rating system for my employer's profile based web-app. Here is my problem: The actual page is domain.com/review.aspx?user=username, but I use the url-rewrite module in IIS to use domain.com/username/review The page contains…
Michael Jasper
  • 7,962
  • 4
  • 40
  • 60
2
votes
1 answer

Getting QueryStrings from WebRequest

Lets say i have this: WebRequest myWebRequest1 = (WebRequest)asynchronousResult.AsyncState; i know that i can get the url like this myWebRequest1.RequestUri but i was wondering if there is any way to get the query strings using a better way than…
Stacker
  • 8,157
  • 18
  • 73
  • 135
2
votes
2 answers

How should I process the values of optional Query Strings?

I'm pretty new to C# and ASP.NET, so bear with me on this one. I'm setting up a page that receives query strings from the url. It then passes these strings to another method (in another class, actually), which goes on to do lots of things…
Michael Martin-Smucker
  • 11,927
  • 7
  • 31
  • 36
1 2
3
13 14