Docstoc

Introduction Of Asp.net

Document Sample
Introduction Of Asp.net Powered By Docstoc
					                                              Introduction to asp.net
    ASP.NET is a compiled, .NET-based environment; you can author applications in any .NET compatible
     language.

    It is completely object oriented.

    ASP.NET has Event driven model whereas ASP has a linear processing model.



Web Forms Code Model

    Visual elements (HTML, server controls, and static text) created in an .aspx

    Page's code is in a separate class file, called the code-behind class file (.aspx.vb or .aspx.cs).

    <%@ Page Language="vb" Codebehind="WebForm1.aspx.vb" Inherits="WebApplication1.WebForm1"%>
Controls-Class Hierarchy
Base classes




Types of Built-in Controls

    HTML Server Controls

    Web Form Controls or ASP.NET Server Controls

    Validation Controls
   Web Controls

 When o/p is sent to browser all the server controls are replaced with <input type=“”> tags.

 Customized Look and Feel using templates

 Automatic Persistence of State across post backs(viewstate)

 Data Binding

 Automatic Browser detection
Validation Controls

    Types of Validation

           Required(RequiredValidator)

           Range Checks(RangeValidator)

           Type Check(CompareValidator)

           Pattern Check(RegularExpressionValidator)

           Custom Validation(CustomValidator)

    Client Side Validation
Why ViewState?

   When the SAME page gets invoked multiple times in the same session

          Need to store information sent during previous invocation of the page

   Cannot save any control information from call to call

          Control’s lifetime tied to the page

   Stateless Communication

          User’s experience must be seamless
Web Forms State Management

    Client based –

           ViewState

           Hidden Form fields

           Cookies

           QueryString

    Server based-

           Application

           Session



Web Application Configuration

    Configuration files-Standard XML files

    Machine.config file

    Web.config file
Format of config file

<configuration>

       <system.web>

       <compilation defaultLanguage="vb"debug="true"/>

       <authentication mode="Windows" />

       <authorization>

       <allow users="*" />

       </authorization>

       <sessionState mode="InProc"

        stateConnectionString="tcpip=127.0.0.1:42424"

        sqlConnectionString="data source=127.0.0.1;user

       id=sa;password=" cookieless="false"      timeout="20"

       />

       </system.web>

</configuration>



ASP.NET Security

    Authentication

             Forms

             Windows

             Passport

    Authorization

       <authorization>

               <allow verb="GET" users="*" />

                  <allow verb="POST" users="Kim" />

               <deny verb="POST" users="*" /> </authorization>

				
DOCUMENT INFO
Shared By:
Tags:
Stats:
views:14
posted:10/13/2012
language:English
pages:7
Description: Its all about basic fundamental of asp.net