C# ASP.NET ADO.NET JAVASCRIPT JQUERY AJAX SILVERLIGHT WPF
C# OOPS HTML&CSS DHTML ASP.NET ADO.NET JAVASCRIPT JQUERY AJAX SILVERLIGHT MVVM WPF SQL SERVER Photoshop Dreamweaver Flash Illustrator
Blog Archive
-
2012
(83)
- September(2)
-
August(81)
- Important WPF Classes and Namespaces
- Applications of WPF
- Programming With WPF
- Limitations of Silverlight and flash
- Silverlight Feature comparison with Flash Features
- How to Add XML File in Your Silverlight Project
- 3 Pixel Shader Effects in Silverlight
- Rotate Image in 3D direction using Silverlight
- First Application of Silverlight
- Silverlight 2.0
- How Install Ajax?
- Ajax Advantage
- JavaScript Loops
- Show a Military Clock and ordinary clock
- How To validate a Form in ASP. Net
- How to show Day of Week
- How to Swap a Image using JavaScript
- Special Character in JavaScript
- Prompt Box in JavaScript
- The use of data adapter.?
- The steps involved to fill a dataset?
- Dataset object in ADO .NET
- Handling Connection Events
- The SQLCONNECTION OBJECT
- Command Constructors
- The SQLCOMMAND OBJECT
- Gridview in ASP.NET
- Introduction Of Master Page
- Server Side State Management
- Query String In ASP.NET
- Cookies in ASP.NET
- State Management in ASP.NET
- Various types of application that we can develop i...
- Properties
- Inheritance ,Polymorphism
- Array,Indexer and Collections
- Control Statements
- Operators, types and variables in C#
- Fundamental of C#
- C# & other Programming Languages
- The WPF Designer
- C# DataTypes
- What is Ajax?
- Silverlight 1.0
- Confirm Box in JavaScript
- Component classes
- Life Cycle of ASP.NET
- The Basics of JQuery
- Jquery Blog Content
- Birth Of WPF
- .Net Frameworks Architecture
- History Of Ajax
- Why Silverlight?
- How to access a URL of parent page in ASP. net
- THE ADO.NET Architecture?
- Architecture of ASP.NET
- Introduction Of Ajax
- Ajax Blog Content
- Introduction of SilverLight
- Silverlight Blog Content
- Introduction to Javascript Blog
- Javascript Blog Content
- Introduction to Ado.Net blog
- Ado.Net Blog Content
- Introduction to C# Blog
- C# Blog Content
- Introduction to Asp.Net
- Asp.Net Blog Content
- Introduction to WPF
- WPF Blog Content
- WPF Interview Question
- Silverlight Interview Question
- Ajax Interview Question
- JQuery Interview Question
- Javascript Interview Question
- DHTML Interview Question
- Ado.Net Inetview Questions
- SQL Interview Questions
- HTML&CSS Interview Questions
- Asp.Net Interview Qusetions
- C# Interview Questions
Architecture of ASP.NET
Architecture of ASP.NET

-
The configuration of ASP.NET is managed by information stored in XML-format in a configuration file (Web.Config).
-
The cache allows for improved performance of ASP.NET, as the most commonly requested pages would be served from
-
the ASP.NET cache.State management services for ASP.NET are provided by the ASP.NET state service.
-
The .NET Framework provides the Common Language Runtime (CLR) , which compiles and manages the execution of ASP.NET
-
code, and the class libraries, which offer prebuilt programmatic functionality for Web Forms, XML support, and exception handling.
-
ADO.NET provides ASP.NET with connections to databases.
3-Tier Architecture in ASP.NET with C#
3-Tier architecture generally contains UI or Presentation Layer, Business Access Layer (BAL) or Business Logic Layer and Data Access Layer (DAL).
Presentation Layer (UI)
Presentation layer contains pages like .aspx or windows
form where data is presented to the user or input is taken from the user.
Business Access Layer (BAL) or Business Logic Layer
BAL contains business logic, validations or calculations
related with the data..
Data Access Layer (DAL)
DAL contains methods that helps business layer to connect
the data and perform required action, might be returning data or manipulating
data (insert, update, delete etc).
Designing 3-Tier Architecture![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()

Data Access Layer (DAL) Code
Code for Data Access Layer
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.OleDb;
public class PersonDAL
{
string connStr = ConfigurationManager.ConnectionStrings
|
Business Access Layer (BAL) Code
Code for Business Access Layer
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public class PersonBAL
{
public PersonBAL()
{
}
public int Insert(string name, string address, int age)
{
PersonDAL pDAL = new PersonDAL();
try
{
return pDAL.Insert(name, address, age);
}
catch
{
throw;
}
finally
{
pDAL = null;
}
}
}
|
Code for .cs file
using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
//Lets validate the page first
if (!Page.IsValid)
return;
int intResult = 0;
PersonBAL pBAL = new PersonBAL();
// Instantiate the object we have to deal with
string name = txtname.Text;
string address = txtaddress.Text;
int age = Int32.Parse(txtAge.Text);
try
{
intResult = pBAL.Insert(name, address, age);
if (intResult > 0)
lblMessage.Text = "New record inserted successfully.";
else
lblMessage.Text = "FirstName [<b>" + txtname.Text + "</b>]
alredy exists, try another name";
}
catch (Exception ee)
{
lblMessage.Text = ee.Message.ToString();
}
finally
{
pBAL = null;
}
}
}
|
Presentation Layer

Code for .aspx page
<%@ Page Language="C#"AutoEventWireup="true"CodeFile="Default.aspx.cs" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<style type="text/css">
.style1
{
width: 100%;
height: 215px;
background-color: #FFFFCC;
}
.style2
{
width: 271px;
}
.style3
{
width: 271px;
height: 44px;
}
.style4
{
height: 44px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div style="background-color: #008000; height: 253px;">
<table class="style1">
<tr>
<td colspan="2">
ADD RECORDS </td>
</tr>
<tr>
<td class="style2">
Name</td>
<td>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td class="style2">
 
Address </td>
<td>
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td class="style3">
Age </td>
<td class="style4">
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td class="style2">
<td>
<asp:Button ID="Button1" runat="server" onclick="Button1_Click"
Text="Save Record" />
</td>
</tr>
<tr>
<td class="style2">
</td>
<td>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
|









