Namespaces in Asp.net

Introduction

Here I am going to discuss some Namespaces used in Asp.net application.

1) The System.Web namespace

System.web namespace holds some basic ingredients which includes classes and built-in Objects like

  1. Server
  2. Application
  3. Request
  4. Response

And Classes used for managing

  1. Cookies
  2. Configuring page caching
  3. Tracing Implementation
  4. Retrieving Information of Web Server and client browser

We uses built-in object frequently .This namespace are very important for ASP.net application, it is also required for User Interface , Web forms and Web services.

2) The System.Web.services namespace

The System.Web.services namespace is a initial point for creating the web services. It contains web service classes , which allow to create XML web services using Asp.Net . XML web services provides feature to exchange messages in loosely coupled environment. using protocol like SOAP , HTTP , XML .

Some classes are as follows

  1. WebMethodAttribute
  2. Webservice
  3. WebServiceAttribute
  4. WebServiceBindingAttribute

3) The System.web.UI.WebControls namespace

The System.web.UI.WebControls namespace contains classes that provides to create web server controls on web pages. These controls run on the server so we can programmaticaly control elements . It also include form controls like text boxes and buttons. special purpose controls such as calender , and Data Grid . Web controls are more abstract than HTML controls . They also provide a shophisticated formatting properties and events . The System.web.UI.WebControls namespace contains web control class which is the base class for all web controls

Some classes are as follows

  1. Calendar
  2. Check Box
  3. Button
  4. Base Data Bound Control
  5. Data Control Field etc

4) The System.web.UI namespace

The System.web.UI namespace includes classes that allows to create server controls with data- binding functionality , which has ability to save view state of given control and pages (.aspx pages) . Many of these types allows to support for controls System.web.UI .Html controls. It is a base class for all HTML ,Web, and User Controls. Every aspx pages comes under it. Control classes provides common set of functionslity

There are following controls available

  • HTML server controls
  • Web server controls
  • User controls

Some classes are as follows

  1. Attribute Collection
  2. BaseParser
  3. BaseTemplateParser
  4. AsyncPostBackTrigger etc

5) The System.web.sessionstate namespace

Session state management comes under The System.web.sessionstate namespace . That enable storage of data specific to a single client with in a web application on the server. Session state is ideal for sensitive data such as mailing address , credit card number , password , important numbers etc. Sesssion state can be used with clients that do not support cookies.

Some classes are as follows

  1. HttpSessionState
  2. HttpSessionStateContainer
  3. SessionIDManager
  4. SessionStateModule etc
Next Recommended Reading Use of Validation Group in asp.net