109. What is cross-page posting in ASP.NET?
The Server.Transfer() method is used to post data from one page to another. In this case, the URL remains the same. However, in cross page posting, data is collected from different Web pages and is displayed on a single page. To do so, you need to set the PostBackUrl property of the control, which specifies the target page. In the target page, you can access the PreviousPage property. For this, you need to use the@PreviousPageType directive. You can access the controls of previous page by using the FindControl()method.
110. Which ASP.NET configuration options are supported in the ASP.NET implementation on the shared Web hosting platform?
There are many ASP.NET configuration choices, which are not able to configure at the site, application, or child directory level on the shared hosting environment. Some options can produce security, performance, and stability problem to the server and therefore cannot be changed.
The following settings are the only ones that can be changed in the web.config file(s) of your Web site:
111. Explain the Application and Session objects in ASP.NET.
Application state is used to store data corresponding to all the variables of an ASP.NET Web application. The data in an application state is stored once and read several times. Application state uses theHttpApplicationState class to store and share the data throughout the application. You can access the information stored in an application state by using the HttpApplication class property. Data stored in the application state is accessible to all the pages of the application and is the same for all the users accessing the application. The HttpApplicationState class provides a lock method, which you can use to ensure that only one user is able to access and modify the data of an application at any instant of time.
Each client accessing a Web application maintains a distinct session with the Web server, and there is also some specific information associated with each of these sessions. Session state is defined in the<sessionState> element of the web.config file. It also stores the data specific to a user session in session variables. Different session variables are created for each user session. In addition, session variables can be accessed from any page of the application. When a user accesses a page, a session ID for the user is created. The session ID is transferred between the server and the client over the HTTP protocol using cookies.
112. How will you differentiate a submaster page from a top-level master page?
Similar to a content page, a submaster page also does not have complete HTML source code; whereas, a top-level master page has complete HTML source code inside its source file.
113. What are Web server controls in ASP.NET?
The ASP.NET Web server controls are objects on the ASP.NET pages that run when the Web page is requested. Many Web server controls, such as button and text box, are similar to the HTML controls. In addition to the HTML controls, there are many controls, which include complex behavior, such as the controls used to connect to data sources and display data.
114. What is the difference between a HyperLink control and a LinkButton control?
A HyperLink control does not have the Click and Command events; whereas, the LinkButton control has these events, which can be handled in the code-behind file of the Web page.