Leading the way in Microsoft Office Development
|SharePoint > ASP NET > Passing Data||< Previous | Next >|
Sending Data to a Web Page
There are two mechanisms for sending data to a webpage.
Parameters can be included in the actual URL string by appending them to the end of the URL.
A querystring provides name-value pairs in the form of ?name1=value1&name2=value2 etc etc
You must place a ? between the URL and the first parameter and then am & between each parameter.
These parameters can be saved in the Favourites but the URL cannot be more than 2083 characters.
This works great for simple alpha-numeric characters but it doesn't work when you want to pass special characters in the URL.
The solution to this problem is to use the System.Web.HttpUtility.UrlEncode function.
This method replaces problematic characters with URL-friendly equivalents.
Alpha-numerics and the characters in the following table are not affected
The following characters are affected
The following table shows what UrlEncode translates:
Parameters are passed in the HTML body instead of the URL (or querystring).
There is virtually no limit to the amount of data you can put in a POST field.
|Copyright © 2011 Better Solutions Limited. All Rights Reserved.||< Previous | Top | Next >|