Which should I use?
<input type="hidden" name="first_name"
value="<%= person.first_name %>" />
or
<input type="hidden" name="first_name"
value="<%= Html.Encode( person.first_name ) %>" />
Which should I use?
<input type="hidden" name="first_name"
value="<%= person.first_name %>" />
or
<input type="hidden" name="first_name"
value="<%= Html.Encode( person.first_name ) %>" />
You should Html.Encode else a " in the field could lead to injection problems
If you want to set a default value for an HTML element, you have to encode the HTML special characters inside the value using character references.