What should you do?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework
version 3.5.The application must redirect the original URL to a different ASPX page.
You need to ensure that the users cannot view the original URL after the page is executed.
You also need to ensure that each page execution requires only one request from the client
browser. What should you do?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework
version 3.5.The application must redirect the original URL to a different ASPX page.
You need to ensure that the users cannot view the original URL after the page is executed.
You also need to ensure that each page execution requires only one request from the client
browser. What should you do?

A.
Use the Server.Transfer method to transfer execution to the correct ASPX page.

B.
Use the Response.Redirect method to transfer execution to the correct ASPX page.

C.
Use the HttpContext.Current.RewritePath method to transfer execution to the correct ASPX page.

D.
Add the Location: new URL value to the Response.Headers collection. Call the
Response.End() statement. Send the header to the client computer to transfer execution to the
correct ASPX page.

Explanation:
Since the users must not be able to view the original Url after the page is executed, one must use HttpContext.Current.RewritePath.

RewritePath Assigns an internal rewrite path and allows for the URL that is requested
to differ from the internal path to the resource. RewritePath is used in cookieless session
state to remove the session state value from the path Uniform Resource Identifier (URI).

MCTS Self-Paced Training Kit (Exam 70-562): Microsoft.Net Framework 3.5-ASP.Net Application Development (pg. 735)



Leave a Reply 0

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