0% found this document useful (0 votes)
39 views18 pages

2.0 Fundamentals Ebook

.Net 2.0 Fundamentals covers the .Net Framework, Asp.Net, and C#.Net, detailing application structures, event flows, and various Asp.Net file types. It includes chapters on data types, variable declarations, state management technologies, and ADO.Net for data access. The document serves as a comprehensive guide for developing applications using Asp.Net and C#.

Uploaded by

ninewaiyan2022
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views18 pages

2.0 Fundamentals Ebook

.Net 2.0 Fundamentals covers the .Net Framework, Asp.Net, and C#.Net, detailing application structures, event flows, and various Asp.Net file types. It includes chapters on data types, variable declarations, state management technologies, and ADO.Net for data access. The document serves as a comprehensive guide for developing applications using Asp.Net and C#.

Uploaded by

ninewaiyan2022
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

2016 1

.Net 2.0 fundamentals


Asp.net 2.0

Stringlive
B.C ( Tech ) ( Hons:)
Web site : https://programmingwiki.org
Facebook : https://www.facebook.com/netprogwiki
CHAPTER 1

1.1 .Net Framework


1.2 Structure of .Net Application
1.3 Asp.Net & C#.Net
1.4 Asp.Net Versions
1.5 Client Server Architecture
1.6 Type of Applications create with Asp.Net
1.7 Event Flows of Asp.net Application
1.8 Event Flows of Asp.net Page
1.9 Asp.Net File Types

CHAPTER 2

2.1 Master Page


2.2 Content Page
2.3 Web Server Controls
2.4 Asp.Net Special Folders
2.5 Data Bound Controls
2.6 Tracing Key

CHAPTER 3

3.1 Data Types


3.2 Variable Declaration and Assign
3.3 Constructor
3.4 Method and Parameters
3.5 Operator
3.6 Function and Variable Scope
3.7 C# Data Type Convertions
3.8 Statements
3.9 Loops

CHAPTER 4

4.1 Validators
4.2 Web User Control, Custom Control, Composite Control

CHAPTER 5
5.1 State Management Technologies

CHAPTER 6
6.1 ADO.Net
CHAPTER 1
1.1 .Net Framework

.Net framework CLR ( Common Language Runtime ) BCL ( Base


Class Library )

CLR ( Common Language Runtime )

 Memory , thread ၊ code ၊ compilation


System
 Programming Coding Compile Assembly( IL+Metadata )
Code ( Native Code ) CLR Just-In-Time
Compiler ၏
 Memory ( Garbage Collection )
 CLR host
 CLR ၏

BCL ( Base Class Library )

BCL namespaces Namespace


function

System , System.Data , System.Data.SqlClient Namespace

using Namespace namespace ၏


function ၊ events properties
1.2 Structure of .Net Application

Coding Compile MSIL MSIL .exe or .dll

Assembly ( IL + Metadata ) Code


CLR ၏ MSIL Code ( Native Code )
CLR
Compile time Programmer
Error Compile Time Exception CLR
Run time
1.3 Asp.Net & C#.Net

- Asp.Net Programming Language


- Asp.Net Framework Microsoft ၏ Web Application develop

- ASP Active Server Pages


- ASP.NET server-side scripting

- C# ၏ "C sharp"
- C# Programmer Application Microsoft ၏
Programming Language

- C#.Net

1.4 Asp.Net Versions

2009 Asp.Net Versions

2002 2003 2005 2006 2009

Visual Studio VS.Net 2002 VS.Net 2003 VS.Net 2005 VS.Net 2005 VS.Net 2008

Languages C# v1.0 C# v1.1 C# v2.0 As before C# v3.0

VB.Net ( v7.0) VB.Net ( v7.1) VB2005 ( v8.0) VB9

Framework Netfx v1.0 Netfx v1.1 Netfx v2.0 Netfx v3.0 Netfx v3.5

Engine ( CLR ) CLR v1.0 CLR v1.1 CLR v2.0 Same version Same version
1.5 Client Server Architecture

Client Browser server web page requests )


Server Browser web page response )

Browsers Mozila Firefox , IE ( Internet Explorer ) , Flock


Server Microsoft IIS ( Internet Information Service )

Client Server web page ၊


http ( hyper text transfer protocol ) ( Link protocol )

1.6 Type of Applications create with Asp.Net

Asp.Net Develop Applications ၅

Window Application
Web Application
Web Service
Console Application
Mobile Application
Asp.Net Application Asp.Net Page

1.7 Event Flows of Asp.net Application


Asp.Net Application

 Application Level Events : (Global.asax)


 Page_Init : page and controls are initialized
 Page_Load : all the controls and page are loaded
 Change events : for controls are processed
 Click events : for controls are processed
 Page_PreRender : page is about to render
 Page_Unload : page is unloaded from memory ( Page Dead )

1.8 Event Flows of Asp.net Page


Asp.Net Page

 Pre_init ( Initialize )
 Init ( Page Initialize )
 InitComplete ( Page Initialize )
 Pre_Load ( Page Load )
 Load (Page Load )
 LoadComplete ( Page Load )
 PreRender ( Page processing )
 RenderComplete ( Page processing )
 Unload ( Page )
1.9 Asp.Net File Types

Asp.Net File Types File

 .aspx
.aspx Web page ၏ Design

 .cs
.cs code-behind module Design ၏
C# Language File extension
C# Language ( pagename.aspx.cs )
VB Language ( pagename.aspx.vb )

 .ascx
User controls File extension

 .asmx
Web services File extension

 .resx
Resources File extension
Application Develop Resource File
Global resource Local Resource Resource

 Global.asax
Application Session ၏

 Web.config
Application ၏ Web.config
Database web.config

CHAPTER 2

2.1 Master Page


Master Page Web Pages ၏ ၊ Design ၊
Menu ၏ Master Page
Control ContentPlaceHolder control Master Page Web Pages
2.2 Content Page
Content Page Master Page Web Page
Content Page Master Page ၏ Design

2.3 Web Server Controls


Web Server Controls
Web Server control ၂ -
“ D“ =“ ”

Function Control Name ID

Label lbl

TextBox txt

List DropDownList ddl

ListBox lst

Image img

Adrotator adr

CheckBox chk

Radio Button rbut

Calendar cld

Com Button but

LinkButton lnkbut

ImageButton imgbut

HyperLink hylnk

Controls CheckBoxList chklst

Panel pnl

RadioButtonList rbutlst
User Name TextBox Control

<asp : TextBox ID=”txtUserName” runat=”server” ></asp:TextBox>

DropDownList Control
<asp:DropDownList ID=”ddlUser” runat=”server “ > < /asp:DropDownList >

2.2 Asp.net Special Folders


Asp.Net web site Special Folders
1 . App_Code
2 . App_Theme
3 . App_Data
4 . App_GlobalResources
5 . App_LocalResources
6 . App_WebReferences
7 . App_Browser
8 . Bin

2.3 Data Bound Controls


D DataSource DataBind( )
Data Bound Controls ၁၂
1. GridView
2. TreeView
3. DropDownList
4. BulletedList
5. DetailsView
6. CheckBoxList
7. RadioButtonList
8. ListBox
9. DataList
10. AdRotator
11. Menu
12. Repeater
2.4 Tracing Key
Trace Key

Command (Hot Key) Description

F9 Trace Break Point F9

Step Into (F11) Trace

Step Over (F10) Trace

Continue (F5) Trace Brake Point F5

Delete All Break Points Application Break Points

(Ctrl+Shift+F9)

CHAPTER 3

3.1 Data Types


Table Data Types

Data Type Long Form Storage Size Range

Int System.Int32 4 bytes –2147483648 to 2147483647

Long System.Int64 8 bytes –9223372036854775808 to


9223372036854775807

Byte System.Byte 1 byte 0 to 255

Float System.Single 4 bytes –1.5x10-45 to 3.4 x x1038

Double System.Double 8 bytes –5.0x10-324 to 1.7x10308

Decimal System.Decimal 12 bytes 1.0x10-28 to 7.9x1028

Char System.Char 2 bytes Unicode character

Boolean System.Boolean 1 byte True or false

String System.String 2 bytes * char count Unicode characters


3.2 Variable Declaration and Assign

MyVariable string Data Type “H W ” string


MyVariable
string MyVariable;
MyVariable = "Hello World!";

MyVariable D “H W ” string
MyVariable
string MyVariable = "Hello World!";

Data Type ၏ Variable


int A, B, C ;

Data Type ၏ Variable


int A = 9, B = 7;

3.3 Constructor
Function Name Class Name return type Constructor
Constructor
1. Default Constructor
2. Argument Constructor

Default Constructor argument


public class Sample
{
public Sample()
{

}
}

Argument Constructor Default Constructor Argument Constructor


argument
public class Sample
{
public Sample(argument)
{

}
}
3.4 Method and Parameters

Parameters Method
protected void Page_Load(object sender,EventArgs e)

{
SetPageTitle();
}

void SetPageTitle()
{
this.Page.Title= “ Test Page”;
}

Parameters Method
private int AddNumbers ( int A , int B)
{

return A + B ;
}

3.5 Operators
Operators
Primary x++ x-- x++ x ၁
x-- x ၁
Unary ++x --x ++ x x ၁
--x x ၁
Multiplicative * / % * / %

Additive + - + -

Shift << >> << >>

Relational < > <= >= < > <= >=

Equality = = != ==( ) != ( )
Conditional AND &&
Conditional OR ||
Conditional c?x:y c x y
Assignment = += -= *= /= Assign
3.6 Function and Variable Scope

Declared Meaning

Public Class

Protected Class Inherit Class

Private Class

3.7 C# Data Type Convertions

Data Type (၃)

int A = 10;
double dblA;
dblA = (double)A;

int intA = 10;


string strA;
strA = Convert.ToString(intA);
intA = Convert.ToInt32(strA);

int intA;
string strA = "10";
// Convert the string "10" to the numeric value 10.
intA = Int32.Parse( strA ) ;

3.8 Statements
3.9 Loops
Statements Loops “C# Programming Fundamentals”
EBook
CHAPTER 4

4.1 Validators
1. Require Field Validator
2. Range Validator
3. Regular Expression Validator
4. Compare Validator
5. Custom Validator
6. Validation Summary

1.Require Field Validator


User Control Data
Require Field Validator Control ၏ Properties
- ControlToValidate
- ErrorMessage
- Text

2.Range Validator
User Data

1 to 110
Range Validator ၏ Properties
- ControlToValidate
- ErrorMessage
- Minimum
- Maximum
- Type
- Text
- Operator

3.Regular Expression Validator


Email
Email “@” Sign ( [email protected] )
Regular Expression Validator ၏ Properties
- ControlToValidate
- ErrorMessage
- ValidationExpression
- Text
4.Compare Validator
၊ Control
Password Confirm Password
Compare Validator ၏ Properties
- ControlToValidate
- ControlToCompare
- ErrorMessage
- Text

5.Custom Validator
Validator Control
Custom Validator ၏ Properties
- ControlToValidate
- ErrorMessage
- ClientValidationFunction
- Text
Event
- ServerValidate

6.Validation Summary
Validation ErrorMessage

4.2 Web User Control, Custom Control, Composite Control


Web User Control
-------------------------
1 . WebSite
2 . ascx
3 . No DLL ( DLL = Dynamic Link Library )
4. W User Control

Custom Controls
----------------------
1 . Project Class Library
2. .cs
3 . DLL Visual Studio 2005/2008 ၏ ToolBox
4. Asp.Net Control
Composite Controls
--------------------------
Custom Control Asp.net Controls
1 . Project Class Library
2. .cs
3 . DLL Visual Studio 2005/2008 ၏ ToolBox
4. Asp.Net Control

CHAPTER 5
5.1 State Management Technologies

Client Side State Management Cross Page


CHAPTER 6

6.1 ADO.Net

ADO.NET Data access Connected Approach Disconnected Approach

Connected Approach
- Connection Database
- Command Database Connection Object
Command

ExecuteNonQuery( )
Return Value
INSERT, UPDATE, or DELETE

ExecuteReader( )
Database Query Result Set
DataReader object
SELECT

ExecuteXMLReader( )
XML File

ExecuteScalar( )
Database query Single value

- DataReader Data Reader - -


- DataAdapter Connected Approach
DataAdapter Disconnected Approach
DataSet
DataAdapter DataSet
Database Data

Disconnected Approach ( DataSet )


DataSet DataTables

You might also like