query-string

Postback with Modified Query String from Dropdown in ASP.NET

My asp.net page will render different controls based on which report a user has selected e.g. some reports require 5 drop downs, some two checkboxes and 6 dropdowns). They can select a report using two methods. With SelectedReport=MyReport in the query string, or by selecting it from a dropdown. And it's a common case for them to come t...

Updating/Intercepting HttpContext.Current.Request.QueryString

Here's a wierd one. I'm reusing a code base that unfortunately, must not be updated. This code makes a call to HttpContext.Current.Request.QueryString. Ideally, I need to push a value into this collection with every request that is made. Is this possible - perhaps in an HTTP Module? ...

reassign value to query string parameter

I have a "showall" query string parameter in the url, the parameter is being added dynamically when "Show All/Show Pages" button is clicked. I want the ability to toggle "showall" query string parameter value depending on user clicking the "Show All/Show Pages" button. I'm doing some nested "if's" and string.Replace() on the url, is t...

Best practice: escape, or encodeURI / encodeURIComponent

When encoding a query string to be sent to a web server - what is the best practice to use from javascript: Use escape: escape("% +&="); OR use encodeURI() / encodeURIComponent() encodeURI("http://www.google.com?var1=value1&var2=value2"); encodeURIComponent("var1=value1&var2=value2"); ...

php $_GET sort problem

here is the input i am getting from my flash file process.php?Q2=898&Aa=Grade1&Tim=0%3A0%3A12&Q1=908&Bb=lkj&Q4=jhj&Q3=08&Cc=North%20America&Q0=1 and in php i use this code foreach ($_GET as $field => $label) { $datarray[]=$_GET[$field]; echo "$field :"; echo $_GET[$field];; echo "<br>"; i get this out put Q2 :898 Aa :Grade1 ...

Returning form, querystring, cookie values by priority in ASP.NET MVC

I'm wondering why query string is preferred when getting values from user request. Where? 1) Code of System.Web.Mvc.DefaultModelBinder looks like this (only part of it): HttpRequestBase request = controllerContext.HttpContext.Request; if (request != null) { if (request.QueryString != null) { values =...

What is the easiest way to read/manipulate query string params using javascript?

The examples I've seen online seem much more complex than I expected (manually parsing &/?/= into pairs, using regular expressions, etc). We're using asp.net ajax (don't see anything in their client side reference) and would consider adding jQuery if it would really help. I would think there is a more elegant solution out there - so fa...

RESTifying URLs

At work here, we have a box serving XML feeds to business partners. Requests for our feeds are customized by specifying query string parameters and values. Some of these parameters are required, but many are not. For example, we've require all requests to specify a GUID to identify the partner, and a request can either be for a "get lat...

How secure is sending sensitive data over https?

I would like to ask you about your opinion guys. Is SSL secure enough for using sensitive data (like password) in query string? Is there any extra options to implement? thanks for any word.X. ...

How do you use querystrings with ASP.NET routing?

The new ASP.NET routing is great for simple path style URL's but if you want to use a url such as: http://example.com/items/search.xhtml?term=Text+to+find&amp;page=2 Do you have to use a catch all parameter with a validation? ...

Outputing a manipulated QueryString in c#

Using the following code I get a nice formatted string: Request.QueryString.ToString Gives me something like: &hello=world&microsoft=sucks But when I use this code to clone the collection to another object (of the same type) I get the Type() back from the ToString() method instead. System.Collections.Specialized.NameValueCollection ...

Security with QueryString values in Asp.net MVC

How do you properly ensure that a user isnt tampering with querystring values or action url values? For example, you might have a Delete Comment action on your CommentController which takes a CommentID. The action url might look like /Comments/Delete/3 to delete the comment with the id 3. Now obviously you dont want anyone to be able to...

Alternative to deprecated javax.servlet.http.HttpUtils.parseQueryString?

I am looking to parse a URL to obtain a collection of the querystring parameters in Java. To be clear, I need to parse a given URL(or string value of a URL object), not the URL from a servlet request. It looks as if the javax.servlet.http.HttpUtils.parseQueryString method would be the obvious choice, but it has been deprecated. Is the...

Validate QueryStrings in ASP.NET

Hi, Is there a library out there which I can use in my current ASP.NET app, to validate queryStrings? Edit ~ Using Regex to look for patterns, like string, only, numeric only, string with length x,...etc Thanks ...

Regex to parse querystring values to named groups

I have a HTML with the following content: ... some text ... <a href="file.aspx?userId=123&section=2">link</a> ... some text ... ... some text ... <a href="file.aspx?section=5&user=678">link</a> ... some text ... ... some text ... I would like to parse that and get a match with named groups: match 1 group["user"]=123 group["section"...

Is a https query string secure?

I am creating a secure web based API that uses HTTPS however if I allow the users to configure it (include sending password) using a query string will this also be secure or should I force it to be done via a POST? ...

maproute, querystings and mvc

I have two routes: routes.MapRoute( "FetchVenue", "venue/fetchlike/{q}", new { controller = "venue", action = "fetchlike" } ); routes.MapRoute( "venue", ...

Debug a start page in vs2008 with query string as startup parameter?

Does anyone know how to set up a default querystring to an asp.net webform which is set up as a start up page? ...

ASP.Net MVC Routing URL QueryString

Is there a way to link to another View that displays search results without having to use a querystring? For example, I know that I can do the following: [AcceptVerbs(HttpVerbs.Post)] public ActionResult Index(string txtOrderNumber) { return RedirectToAction("OrderLookup", new { controller = "Report", id = txtOrderNumber }); ...

MoinMoin CGI and Query String Parameters

I've just chosen MoinMoin over TWiki to create a simple-but-robust web site. In addition to zero ramp-up and very basic authentication and Wiki features, I need to execute a few simple scripts that take the user's ID and email address as parameters. TWiki supported this with: [[/cgi-bin/mywiki/userscript?id=%USERNAME%&email=%USERINFO{...