I have an Asp.net form ( runat=Server)
Im trying to figure out what is the difference between HTML Entities and ISO Latin-1 codes - and why does one Do cause exception while the other Isnt.
I have input and button
<input type="text" value="<d"/>
<asp:Button ID="s" runat="server" Text="press" />
when I press submit - it goes with Exception which is fine.
1 way to solve it is by encodeUriComponent :
so putting the value :
value="%3Cd"/>
is fine and No expcetion on submit.
Also , as we know - if i put
>
or <
( which is html entity) it wont go exception. ( it has other role in Html world - to DISPLAY '<' '>' - and not try to parse them as html...)
(no exception - except the second press - because when its back from the server - the textbox shows <d
which is bad...
NOw lets go to the ISO Latin-1 code
like here
now lets try to put instead of <d
----> <d
and it goes bang !
1)why do i get an exception in the Latin code and not in the html entity ?
1) what is the difference between them ?
2) when should i use one or another ?
Edit
I know I can disable the checking by set validateRequest = false. but my questions are not related to this.