Which of the following is a method that is used to navigate from one page to another…?

Which of the following is a method that is used to navigate from one page to another and is called
when execution of the first page is terminated and execution of the second page begins?

Which of the following is a method that is used to navigate from one page to another and is called
when execution of the first page is terminated and execution of the second page begins?

A.
Response.Redirect

B.
App.config

C.
Trace.axd

D.
Server.Transfer

Explanation:
The Server.Transfer() method is used to navigate from one page to another. When the method is
called, execution of the first page is terminated and execution of the second page begins. It passes
the page information, such as input field values, to the second page. It means only the ASP built-in
objects and the ASP Error object values are transferred from the first page to the second page. Any
variables declared on the first page are not available on the second page. Use the
IsCrossPagePostback property of the first page object to determine whether the current page is
posted from the Server.Transfer() method call. If the Server.Transfer() method is used, the
IsCrossPagePostBack property value is false. If a cross-page posting is used, the IsCrossPagePostBack
property value is true.

Answer A is incorrect. Redirect is a method of the Response object. It is used to navigate through
the server script. This method sends a redirect message to the browser, causing it to attempt to
connect to a different URL. The Response.Redirect method accepts the Uniform Resource Locator
(URL) of the page, to which a user has to be redirected, as a parameter.
Syntax:
Response.Redirect URL
where, URL is the Uniform Resource Locator (URL) of the page to which a user has to be redirected.

Answer C is incorrect. Trace.axd is an Http Handler that can be used to view the trace details for an
application. This file resides in the application’s root directory. A request to this file through a
browser displays the trace log of the last n requests in time-order, where n is an integer determined
by the value set by requestLimit=”[n]” in the application’s configuration file.

Answer B is incorrect. The App.config (Application configuration) file is a .NET configuration file that
consists of a chain of settings specific to a Windows application. This file is usually located in the root
directory of the application that is being configured according to a particular computer. Generally,
the application configuration files override the configuration settings in the Machine.config
(Machine configuration) file.



Leave a Reply 0

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