<% %>
<% %>
Request
object retrieves the values that the client browser passed to the server during an HTTP request.
Request.QueryString
collection retrieves the values of the variables in the HTTP query string, which is specified by the values following the question mark ‘?’.
For example, the following anchor tag generates a variable named string
with the value “a sample.”
<a href="example?string=a sample">string sample</a>Query strings are also generated by sending a form or by a user typing a query into the address box of the browser.
HttpUtility
class provides methods for encoding and decoding URLs when processing web requests.
HttpUtility.HtmlEncode
method converts a string to an HTML-encoded string.
HTML encoding makes sure that text is displayed correctly in the browser and not interpreted by the browser as HTML.
For example, if a text string contains a less than sign (<) or greater than sign (>), the browser would interpret these characters as the opening or closing bracket of an HTML tag.
When the characters are HTML encoded, they are converted to the strings <
and >
, which causes the browser to display the less than sign and greater than sign correctly.
Nothing
keyword represents the default value of any data type.
Assigning Nothing
to a variable sets it to the default value for its declared type.