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
Life Cycle of ASP.NET
Life Cycle of ASP.NET
Page Life Cycle Events
- Page_Init: The server controls are loaded and initialized from the Web form's view state. it is basically used for initialized the object and control
- Page_Load:The server controls are loaded in the page object. View state information is available at this point, so this is where you put code to change control settings or display text on the page.
- Page_PreRender: The application is about to render the page object.
- Page_Unload: The page is unloaded from memory.
- Page_Disposed: The page object is released from memory. This is the last event in the life of a page object.
- Page_Error: An unhandled exception occurs.
- Page_AbortTransaction: A transaction is aborted.
- Page_CommitTransaction: A transaction is accepted.
- Page_DataBinding: A server control on the page binds to a data source.
Control in ASP.NET
-
HTML Controls - Traditional HTML tags
-
Web Server Controls - New ASP.NET tags
-
Validation Server Controls - For input validation
HTML Server Controls
HTML server controls are HTML tags understood by the server.
HTML elements in ASP.NET files are, by default, treated as text. To make these elements programmable, add a runat="server" attribute to the HTML element. This attribute indicates that the element should be treated as a server control. The id attribute is added to identify the server control. The id reference can be used to manipulate the server control at run time.
Note: All HTML server controls must be within a <form> tag with the runat="server" attribute. The runat="server" attribute indicates that the form should be processed on the server. It also indicates that the enclosed controls can be accessed by server scripts.
DESIGN OF HTML CONTROL
<script language="javascript" type="text/javascript">
function Submit1_onclick() {
alert("click me");
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<input id="Text1" type="text" value="anil" />
<input id="Submit1" type="submit" value="submit"
|
Web Server Controls
- Web server controls are special ASP.NET tags understood by the server.
- Like HTML server controls, Web server controls are also created on the server and they require a runat="server" attribute to work.
- However, Web server controls do not necessarily map to any existing HTML elements and they may represent more complex elements.
The syntax for creating a Web server control is:
| <asp:control_name id="some_id" runat="server" /> |
DESIGN OF WEB SERVER CONTROL

.ASPX CODE
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div style="width: 246px; background-color: #66FFFF;">
Name
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<br />
<asp:TextBox ID="TextBox2"
runat="server" ></asp:TextBox>
<br />
<br />
<asp:Button ID="Button1" runat="server" onclick="Button1_Click"
Text="click me" />
<br />
<br />
</div>
</form>
</body>
</html>
|
.CS CODE
protected void Button1_Click(object sender, EventArgs e)
{
TextBox1.Text = "wiliam";
TextBox2.Text = "hello world";
}
|
Validation Server Controls
DESIGN OF VALIDATION SERVER CONTROL

Validation server controls are used to validate user-input. If the user-input does not pass validation, it will display an error message to the user.
.ASPX CODE
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div style="width: 414px; background-color: #66FFFF;">
Name
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
ControlToValidate="TextBox1" ErrorMessage="Blank are not allowed"
SetFocusOnError="True"></asp:RequiredFieldValidator>
<br />
Address
<asp:TextBox ID="TextBox2"
runat="server" ontextchanged="TextBox2_TextChanged"></asp:TextBox>
<br />
<br />
<asp:Button ID="Button1" runat="server" onclick="Button1_Click"
Text="click me" />
<br />
<br />
</div>
</form>
</body>
</html>
|
CS CODE
protected void Button1_Click(object sender, EventArgs e)
{
TextBox1.Text = "123";
TextBox2.Text = "hello world";
Response.Write("hi display textbox 1 value"+TextBox1.Text);
}
|









