News
IBM to offer mobile security as a service IBM will start delivering mobile security-as-a-service (MaaS) through its own cloud infrastructure in India, a move that is expected to better address in-country data requirements... IBM Spectrum Computing: IBM has enlarged its portfolio of software-defined infrastructure solutions with cognitive features for workload management.  * LiFi internet technology has been introduced, the new type of wireless internet connection that gives 100 times faster than traditional WiFi -- Invented by Professor Harald Haas from the University of Edinburgh. * Sci. Rachid Yazami has developed a smart chip that charges smartphones in less than 10 minutes. BenQ has launched BlueCore projector - Consumer electronics major BenQ has launched its first BlueCore laser light source projector. For those unaware, devices with BlueCore laser technology have a high contrast output of 80000:1 with an extended lamp life and efficiency. *** 
Category - ASP.Net Technical Questions
 
1. What is Asp.Net page LifeCycle?
Ans:
When we request an ASP.NET page, the page goes through a life cycle in which it
performs a series of processing steps.

  • Page request - Checks whether a cached version of the page can be sent in response without running the page.
  • Start - Sets the page properties such as Request, Response, IsPostBack and UICulture.
  • Initialization - Each control's UniqueID property is set. A master page and themes are also applied to the page if applicable.
  • Load - During load, if the current request is a postback, control properties are loaded with information recovered from viewstate and control state.
  • Postback event handling - If the request is a postback, control event handlers are called.
  • Rendering - Before rendering, view state is saved for the page and all controls. During the rendering stage, the page calls the Render method for each control.
  • Unload - The Unload event is raised after the page has been fully rendered and page properties such as Response and Request are unloaded and cleanup is performed.

We have various events that a page undergoes during the above processing steps
like PreInit, Init, InitComplete, PreLoad, Load, etc.,


2. What is IsPostBack property?
Ans:
  • It is a property which tells us whether the page is being loaded for the first time or is being loaded in due to a postback.
  • i.e.,if IsPostBack is false then it is being loaded for the first time else it is being loaded due to a postback


3. What is a validation control?
Ans:
ASP.NET validation controls validate the user input data to ensure that useless, unauthenticated, or contradictory data don't get stored.

ASP.NET provides the following validation controls:
  • RequiredFieldValidator
  • RangeValidator
  • CompareValidator
  • RegularExpressionValidator
  • CustomValidator
  • ValidationSummary

4. What are the types of Authentication in ASP.NET?
Ans:
There are three types of authentication available in ASP.NET:

Windows Authentication:  This authentication method uses built-in windows security features to authenticate user.

Forms Authentication: authenticate against a customized list of users or users in a database.

Passport Authentication: validates against Microsoft Passport service which is basically a centralized authentication service.

5. What is a user control?
Ans:
  • Some time you may need functionality in a control that is not provided by the built-in ASP.NET Web server controls.
  • In this case you can create your own controls called as User controls.
  • User controls are combination of various Web server controls and some code implemented for it.
  • You can then treat the user control as new control and use on any page by dragging and dropping it from project folder.

6. What is Custom Control ?
Ans:
Custom controls are deployed as individual assemblies. They are compiled into a Dynamic Link Library (DLL) and used as any other ASP.NET server control. 
They could be created in either of the following way:
  • By deriving a custom control from an existing control
  • By composing a new custom control combing two or more existing controls.
  • By deriving from the base control class.
Custom Control Inherits from WebControl to achieve some extra functionality. These are classes.

Sample Custom Control

public class DropdownListExtended : DropdownList
{
     // My custom logic
     // ususaly an event is overriden by developers to achieve extra functionality
}

7. What is the difference between custom controls and user controls?
Ans:
Usercontrol:
  • User control can be used for the Reusable purpose only.
  • Once you create User control that can be access in current project.
  • User control extenction is .ascx file.
  • It can be visible in Solution explorer.
  • It is Locally used.If you want used this control in any page just drag and drop from Solution or Register that particular page like 
<%@ Register TagPrefix="scott" TagName="header"  Src="Controls/Header.ascx"  %>

Custom Control:
  • Custom control can used for Globale purpose like Tollbox controls.
  • Custom control can created extenction file is .dll .
  • It can Add to Toolbox like  Right click on toolbox add->choose itemes->select path of file.
  • Custom control If you want used in any forms just you can drag and drop like normal control.

8. What is a master page?
Ans:
ASP.NET master pages allow you to create a consistent layout for the pages in your application. 
A single master page defines the look and feel and standard behavior that you want for all of the pages (or a group of pages) in your application.

Eg:  
Header, Menu and Footer is common on all the pages, So we can move into master page.

9. What is state management?
Ans:
  • HTTP is a stateless protocol i.e., Server will not maintain the state of the client.
  • In simple terms we cannot carry any value or data from one post back to another post back on same page or different pages by default.
  • To achieve this we follow some techniques called as state management techniques.

10. What are Session state modes in ASP.NET?
Ans:
ASP.NET supports different session state storage options:

In-Process is the default approach. It stores session state locally on same web server memory where the application is running.
StateServer mode stores session state in a process other than the one where application is running. Naturally, it has added advantages that session state is accessible from multiple web servers in a Web Farm and also session state will remain preserved even web application is restarted.
SQLServer mode stores session state in SQL Server database. It has the same advantages as that of StateServer.
Custom modes allows to define our custom storage provider.
Off mode disables session storage.


123
Search
Recent Posts
Create Amazon ElasticCache Using Memcached in CSharp
Oct 29 2018 12:09PM Posted By Amose
Get Google Map Lat Lng (Geo Point) By Pincode in C#
Oct 28 2018 12:09PM Posted By Pranav
Google URL Shortener in C#
Oct 20 2018 12:09PM Posted By Sanjay
Bind Gridview from CSV file in Asp.Net C#
Oct 5 2018 12:09PM Posted By Michael
Call WebService method from jQuery in every 1 minute
Sep 26 2018 12:09PM Posted By John
Gridview custom CSS in ASP.Net
Sep 14 2018 12:09PM Posted By Micheal Ryan
Read excel file and bind to Gridview in C#
Sep 10 2018 12:09PM Posted By Micheal
Tags
Follow us on Facebook
Follow us on Google +
Recent post in your Email inbox.
Enter your email address: