Search This Blog

Saturday, June 25, 2011

how to configure httpruntime?

<configuration>
<system.web>
<httpRuntime useFullyQualifiedRedirectUrl="true|false"
maxRequestLength="size in kbytes"
executionTimeout="seconds"
minFreeThreads="number of threads"
minFreeLocalRequestFreeThreads="number of threads"
appRequestQueueLimit="number of requests"
versionHeader="version string"/>
</configuration>
</system.web>

HTML: What does &#39; mean?

&#39; is html encoding for apostrophe(')

Whenever we type an apostrophe(') the ecards(html) replaces it with &#39;. So &#39; is the Html representation for apostrophe(').

For Example: Html will convert Rahul's into Rahul&#39;s.

Wednesday, June 15, 2011

How to Encode and Decode a QueryString using c#?

Use HttpUtility.UrlEncode(string QueryString) to encode a url or query string
e.g the actual url is "http://192.168.45.48/encoding/encode.aspx?crdl1=esos.{€h579". This url has some special character "{€". If you want to encode this url do as

HttpUtility.UrlEncode("http://192.168.45.48/encoding/encode.aspx?crdl1=esos.{€h579")
output will come as "http://192.168.45.48/encoding/encode.aspx?crdl1=esos.%7B%E2%82%ACh579".

And you can decode this encoded url using following code:
HttpUtility.UrlDecode("http://192.168.45.48/encoding/encode.aspx?crdl1=esos.%7B%E2%82%ACh579")

the output will come as "http://192.168.45.48/encoding/encode.aspx?crdl1=esos.{€h579"