query-string

Passing param values to redirect_to as querystring in rails

This should be simple, but I can't seem to find an easy answer. How can I pass param values from the current request into a redirect_to call? I have some form values I'd like to pass into the query string of a GET redirect I'd like to do something like: redirect_to @thing, :foo => params[:foo] and get sent to: http://things/4?[foo...

How to pass multiple parameters in a querystring

I have three values which I have to pass as parameters for e.g., strID, strName and strDate. I want to redirect these three parameters to another page in Response.Redirect().Can anybody provide me with the correct querystring? ...

Need help in filtering out some vulnerablity causing characters in querystring

I need to filter out characters like /?-^%{}[];$=*`#|&@'\"<>()+,\. I need replace this with empty string if it is there in the query string. Please help me out. I am using this in ASP pages. ...

What characters are unsafe in query strings?

I need to prevent the characters that cause vulnerablities in the url My sample url http://localhost/add.aspx?id=4;req=4 Please give the list of characters that I need block. I am using ASP.net web page. I am binding the information from sql server database. I just want to list the characters to stay away from Hackers to enter unwant...

What happens if the action field in a <form> has parameters?

Is there a well-supported, common behavior that I can expect if I do something like this in HTML: <form method="get" action="/somePage.html?param1=foo&param2=foo"> <input name="param2"></input> <input name="param3"></input> </form> Seems like this sort of thing is inherently ridiculous, but I've seen it used here and there and I w...

How to get textbox value from client side and create query string from it?

I'm using jquery for modal dialogs. I want to open model dialog from one page and to send some additional query string to modal dialog page. something like this: <asp:HyperLink ID="hypClientSearch" runat="server" NavigateUrl="~/SomePage.aspx?KeepThis=true&additionalQS='<%= txtBox.Text %>'&TB_iframe=true&height=650&width=800&modal=true"...

ASP.NET Querystring being removed on first load

Hi, I'm experiencing a frustrating issue with asp.net. Open a fresh browser (cleared history, temp files etc...) Load www.mysite.com/page.aspx?anystring=1234 The page will load as www.mysite.com/page.aspx. The querystring will be gone. Something redirected and deleted it. But: Open a fresh browser (cleared history, temp files et...

Replace item in querystring

Hello I have a URL that also might have a query string part, the query string might be empty or have multiple items. I want to replace one of the items in the query string or add it if the item doesn't already exists. I have an URI object with the complete URL. My first idea was to use regex and some string magic, that should do it. ...

How send parameters with javascript tag?

How can I send parameters (with QueryString) within a javascript tag as the source attribute to a ASP.NET page? Example: <script language="javascript" src="myDomain/myPage.aspx?id=123&no=43"></script> And what I have to do in "myPage.aspx"? For example I want to send a picture to the script tag according to it's src querystring. ...

How can I convert query string or JSON object map to single JSON object with jQuery?

For this example, assume that I have a list of months in a form, each with a checkbox next to them. I'm looking for help on doing either of two things: Convert a query string (e.g. "January=on&March=on&September=on") or Convert an object map: [{ January: 'on' },{ March: 'on' },{ September: 'on' }] to a single JSON object: { January:...

asp.net mvc multi-parameter requests for dynamic images?

In webforms, we would do somthing like this to set up a hander to generate a dyanmic image: <img src="/barchart.aspx?width=1024&height=768&chartId=50" > Then of course we would write code on the .aspx page to render the image using the parameters and write it back into the response. I am honestly not sure how to set up/handle such a...

How to remove x and y on submit in HTML form with Image type button ??

I have created a form in my application as follows: <form action="/search/" method="get"> <input id="search-box" name="search" type="text" size=30 title="Search" value="" /> <input id="search-submit" type="image" alt="Search" src="/images/search-button.gif" /> </form> But when I am submitting my form then URL is created as belo...

Do you expect query string parameter names to be case sensitive?

Silverlight is case sensitive for query string parameters so the following code would return false with "callid=5" string callId; if (System.Windows.Browser.HtmlPage.Document.QueryString.TryGetValue("callId", out callId)) { .... } Microsoft defends the decision by citing the www.w3.org spec, but I think it leads to a less friendly exp...

Not generating a complete response from a HttpWebResponse object in C#

I am creating a HttpWebRequest object from another aspx page to save the response stream to my data store. The Url I am using to create the HttpWebRequest object has querystring to render the correct output. When I browse to the page using any old browser it renders correctly. When I try to retrieve the output stream using the HttpWeb...

How to build a query string for a URL in C#?

A common task when calling web resources from a code is building a query string to including all the necessary parameters. While by all means no rocket science, there are some nifty details you need to take care of like, appending an & if not the first parameter, encoding the parameters etc. The code to do it is very simple, but a bit t...

Send values from other controls to User Control properties in .aspx page

Is there a way pass values from other controls (e.g. "selected value of dropdownlist", "value from query string") to a User Control using a property within the tag itself and NOT from the code behind? ...

Any gotchas with Request.Params [ASP.NET]

Hopefully the answer is no, but are there any problems with using Request.Params instead of Request.QueryString for retrieving data in the query string in asp.net? ...

how to return an asp.net mvc view with a query string?

In Asp.NET MVC, how do you make your controller return a view with a query string? thanks ...

Caching from URLs with a query string

The web application I'm working on serves up images with URLs like /image?name=a.gif. Pages are loading slowly partly because browsers are not caching the images. Is there any combination of http headers that will persuade IE to cache the images even though the URL has a query string in it? I'm trying to avoid the browser making any unn...

Is there a way to clear the query string paramters when posting back?

I have a form that sometimes gets linked to with some query string parameters. The problem is that when I post back the form, the query string parameter is still there. Its not really an issue the way I have it setup, but I just don't like it being there, and could see it being a problem if you needed to check for input in a certain or...