Answer:
Step-1: First encode the user input with the HtmlEncode methods so that the method will return HTML into its text representation.
Step-2: When you are using bound fields of a Data controls, then set the BoundField object's HtmlEncode property to true which causes the Data control to encode input given by the user when you are in edit mode of that Data control.
Asked In: Many Interviews |
Alert Moderator