Which two actions should you perform?

You are creating an ASP.NET application by using the .NET Framework 3.5.

The application will allow users to enter HTML content into a Web form. The HTML content will be stored in a Microsoft SQL Server database.

You need to ensure that the content can be posted to the page. You also need to ensure that potentially harmful script cannot be stored in the database.

Which two actions should you perform? (Each correct answer presents part of the solution.
Choose two.)

You are creating an ASP.NET application by using the .NET Framework 3.5.

The application will allow users to enter HTML content into a Web form. The HTML content will be stored in a Microsoft SQL Server database.

You need to ensure that the content can be posted to the page. You also need to ensure that potentially harmful script cannot be stored in the database.

Which two actions should you perform? (Each correct answer presents part of the solution.
Choose two.)

A.
Use the Server.HtmlEncode method when saving the text to the database.

B.
Use the Server.HtmlDecode method when saving the text to the database.

C.
Set the ValidateRequest attribute of the @Page directive to true.

D.
Set the ValidateRequest attribute of the @Page directive to false.

E.
Set the validateRequestattribute of the pages element to true in the Web.config file.



Leave a Reply 0

Your email address will not be published. Required fields are marked *