aspdotnet-suresh offers articles and tutorials,csharp dot net, articles and tutorials,VB.NET Articles,Gridview articles,code examples of 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

JavaScript - How to Pass Ampersand in Querystring Value in

Mar 26, 2014

Here I will explain how to send ampersand in querystring value in JavaScript using or passing ampersand in query string JavaScript or

In previous articles I explained jQuery check if string contains special characters or not, jQuery hide or show password characters,
jQuery expand textbox on focus, jQuery disable right click on image and many articles related to jQuery, JavaScript. Now I will explain how to send ampersand value in querystring using JavaScript in

Generally ampersand ‘&’ will work as separator between value pairs like as shown below

Here if name contains ampersand & like “S&R Info” we need to encode & as %26 or we can pass url parameter with Server.UrlEncode() like as shown below

<script type="text/javascript">
var str = " Server.UrlEncode(S&R Info)&userid=231"

<script type="text/javascript">
var str = " S%26R Info&userid=231"

I hope it helps you….Happy coding

If you enjoyed this post, please support the blog below. It's FREE!

Get the latest,, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email.

subscribe by rss Subscribe by RSS subscribe by email Subscribe by Email
© 2015 All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.