Which code segment should you use?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. The application runs on Microsoft IIS 6.0.
You create a page named oldPage.aspx.
You need to ensure that the following requirements are met when a user attempts to access the page:
The browser diplays the URL of the oldPage.aspx page.
The browser displays the page named newPage.aspx Which code segment should you use?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. The application runs on Microsoft IIS 6.0.
You create a page named oldPage.aspx.
You need to ensure that the following requirements are met when a user attempts to access the page:
The browser diplays the URL of the oldPage.aspx page.
The browser displays the page named newPage.aspx Which code segment should you use?

A.
Server.Transfer("newPage.aspx")

B.
Response.Redirect("newPage.aspx")

C.
If Request.Url.UserEscaped Then
Server.TransferRequest("newPage.aspx")
Else
Response.Redirect("newPage.aspx", True)
End If

D.
If Request.Url.UserEscaped Then
Response.RedirectLocation = "oldPage.aspx"
Response.Redirect("newPage.aspx", True)
Else
Response.Redirect("newPage.aspx")
End If



Leave a Reply 0

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