ASP.Net Interview Question and Answers

21. What are the different ways to send data across pages in Asp.net?
 
    The following two ways are used to send data across pages in Asp.net:
  • Session
  • Public properties
 
Gangurde, says Apr 24,2014
Session is best example to send data across page in Asp.net.
Vishnu rathorq, says Jan 24,2014
    Four ways to send data from one page to another page :
  • Session
  • Cookies
  • View state
  • Hidden field
Your Name Your Email-ID
Your Answer
22. Where is the Viewstate information stored?
  The Viewstate information is stored in the HTML hidden fields.
 
Tony Martin, said July 17, 2018
ViewState is a .Net mechanism to store the posted data among post backs. ViewState allows the state of objects to be stored in a hidden field on the page, saved on client side and transported back to server whenever required. View state is the method that the ASP.NET page framework uses to preserve page and control values between round trips.
Your Name Your Email-ID
Your Answer
23. What are different types of directives in .NET?
 
  • @Page
  • @Control
  • @Import
  • @Implements
  • @Register
  • @Assembly
  • @OutputCache
  • @Reference
 
Lalitha,says May 13, 2014
  • @page
  • @web user control
  • @master page
  • @import
  • @implement
  • @register
  • @reference
  • @output cache
  • @application
  • @web service
  • @assembly
  • @master type
Your Name Your Email-ID
Your Answer
24. What is the default timeout for a cookie?
  The default time duration for a cookie is 30 minutes.
 
Your Name Your Email-ID
Your Answer
25. What is the difference between HTML and Web server controls?
  HTML controls are client side controls therefore, all the validations for HTML controls are performed at the client side.
On the other hand, Web server controls are server side controls; therefore, all the validations for Web server controls are performed at the server side.
 
Anthony N,says Mar 24,2014
Server Side Controls have events which can be written in the code behind file. Server Side Controls are accessible in the code behind file. HTML Controls are a bit light weight as no rendering is performed on the server. When application need to be lightweight and more faster, use HTML controls with AJAX or REST to transfer data between server and client.
Your Name Your Email-ID
Your Answer