- Back to Home »
- Querystring in ASP.NET and C#.NET with Advanced mode
Posted by : my solutions
Thursday, September 19, 2013
This blog always will helps you to learn topics from basics to advanced. Now i would like explain about QUERYSTRING in .Net by using Asp.net and C#.net
-------------------------------------------------------------------------------------------------------
Create one website with more than one web page Home.aspx and Contact.aspx
like
Come to the Contact.aspx.cs side and write the code like this
Small comparison kindly view the picture at once as carefully
Now we will discuss about theortical part about Querystring
Querystring: A Querysting is a technique uses to pass values from one page to anotherpage via URL
Important points about Querystring
------------------------------------
How to encrypt the Querystring data
How to pass special characters through querystring.
How to encrypt and decrypt the data in the Querysting and why we are go for this encryption and decryption
------------------------------------------------------------------------------------------------------------
Watch carefully in the image
Then How to Encrypt and Decrypt this for watch following image
Now you can check your Address bar URL
How to pass special Characters in QueryString
Here i passed the test with +-
check result
See the picture as carefuuly '+' symbol missing in the result. But it was shown in the addressbar
How to Reget means-> Simple you can unblock the Encrypt code.
Now you can able to get data with +. So encryption and decryption will helps a lot in the querystring.
Another way to get special character from the Querystring is
Response.Redirect("http://localhost:4186/Contact.aspx?u=" + Server.UrlEncode(name_p), false);
by used "Server.UrlEncode" you can get full value from Querystring
--------------------------------------------------------------------------------------------------------
More Extra point regarding Query sting limit
* Microsoft Internet Explorer has a maximum uniform resource locator (URL) length of 2,083 characters. Internet Explorer also has a maximum path length of 2,048 characters.
Happy coding with P.M@ruthi