Monday, June 18, 2012

Benefits of ASP.NET

0 comments
ASP.NET delivers the following other advantages to Web application developers:



  1. Executable portions of a Web application compiled so they execute more quickly than interpreted scripts


  2. On-the-fly updates of deployed Web applications without restarting the server


  3. Access to the .NET Framework, which extends the Windows API


  4. Use of the widely known Visual Basic programming language, which has been enhanced to fully support object-oriented programming


  5. Introduction of the new Visual C# programming language, which provides a type-safe, object-oriented version of the C programming language


  6. Automatic state management for controls on a Web page (called server controls) so that they behave much more like Windows controls


  7. The ability to create new, customized server controls from existing controls


  8. Built-in security through the Windows server or through other authentication/authorization methods


  9. Integration with Microsoft ADO.NET to provide database access and database design tools from within Visual Studio .NET


  10. Full support for Extensible Markup Language (XML), cascading style sheets (CSS), and other new and established Web standards


  11. Built-in features for caching frequently requested Web pages on the server, localizing content for specific languages and cultures, and detecting browser capabilities


Wednesday, February 8, 2012

0 comments
The Structure of an ASP.NET Page

The following is a list of the important elements of an ASP.NET page:
1. Directives
2. Code declaration blocks
3. ASP.NET controls
4. Code render blocks
5. Server-side comments
6. Server-side include directives
7. Literal text and HTML tags
1. Directives
A directive controls how an ASP.NET page is compiled. The beginning of a directive is marked with the characters <%@
and the end of a directive is marked with the characters %>. A directive can appear anywhere within a page. By convention,
however, a directive typically appears at the top of an ASP.NET page.
There are several types of directives that you can add to an ASP.NET page. Two of the most useful types are page and import
directives.
Page Directives
You can use a page directive to specify the default programming language for a page.
<%@ Page Language="VB" %>
Import Directives
By default, only certain namespaces are automatically imported into an ASP.NET page. If you want to refer to a class that
isn't a member of one of the default namespaces, then you must explicitly import the namespace of the class.
<%@ Import Namespace="System.Web.Mail" %>

2. Code Declaration Blocks
A code declaration block contains all the application logic for your ASP.NET page and all the global variable declarations,
subroutines, and functions. It must appear within a
3. ASP.NET Controls
ASP.NET controls can be freely placed with the text and HTML content of a page. The only requirement is that the controls
should appear within a
tag.
One significant limitation of ASP.NET pages is that they can contain only one tag. This
means that you cannot group ASP.NET into multiple forms on a page. If you try, you get an error.
4. Code Render Blocks
If you need to execute code within the HTML or text content of your ASP.NET page, you can do so within code render
blocks. The two types of code render blocks are inline code and inline expressions. Inline code executes a statement or series
of statements. This type of code begins with the characters <% and ends with the characters %>.
Inline expressions, on the other hand, display the value of a variable or method (this type of code is shorthand for
Response.Write). Inline expressions begin with the characters <%= and end with the characters %>.
Inline expressions, on the other hand, display the value of a variable or method (this type of code is shorthand for
Response.Write). Inline expressions begin with the characters <%= and end with the characters %>.
5. Server-side Comments
You can add comments to your ASP.NET pages by using server-side comment blocks. The beginning of a server-side
comment is marked with the characters <%-- and the end of the comment is marked with the characters --%>.
6. Server-side Include Directives
You can include a file in an ASP.NET page by using one of the two forms of the server-side include directive. If you want
to include a file that is located in the same directory or in a subdirectory of the page including the file, you would use the
following directive:
7. Literal Text and HTML Tags
The final type of element that you can include in an ASP.NET page is HTML content. The static portion of your page is built
with plain old HTML tags and text.

ASP.Net Page Life Cycle

2 comments

ASP.Net Page Life Cycle Events:

At each stage of the page life cycle, the page raises some events, which could be coded. An event handler is basically a function or subroutine, bound to the event, using declarative attributes like Onclick or handle.

Following are the page life cycle events:

PreInit PreInit is the first event in page life cycle. It checks the IsPostBack property and determines whether the page is a postback. It sets the themes and master pages, creates dynamic controls and gets and sets profile property values. This event can be handled by overloading the OnPreInit method or creating a Page_PreInit handler.

Init Init event initializes the control property and the control tree is built. This event can be handled by overloading the OnInit method or creating a Page_Init handler.

InitComplete InitComplete event allows tracking of view state. All the controls turn on view-state tracking.

LoadViewState LoadViewState event allows loading view state information into the controls.

LoadPostData during this phase, the contents of all the input fields defined with the tag are processed.

PreLoad PreLoad occurs before the post back data is loaded in the controls. This event can be handled by overloading the OnPreLoad method or creating a Page_PreLoad handler.

Load the Load event is raised for the page first and then recursively for all child controls. The controls in the control tree are created. This event can be handled by overloading the OnLoad method or creating a Page_Load handler.

LoadComplete the loading process is completed, control event handlers are run and page validation takes place. This event can be handled by overloading the OnLoadComplete method or creating a Page_LoadComplete handler.

PreRender the PreRender event occurs just before the output is rendered. By handling this event, pages and controls can perform any updates before the output is rendered.

PreRenderComplete the PreRender event is recursively fired for all child controls, this event ensures the completion of the pre-rendering phase.

Tuesday, February 7, 2012

.NET Framework 3.5 ASP.Net Chart Control Example

0 comments
.NET Framework 3.5 ASP.Net Chart Control Example

What Is .Net Framework

1 comments
The .NET Framework is designed with number of functions to fulfill some important needs of programming world.

  • It has code-execution environment that reduces the problem of software deployment and versioning.

  • It provides object-oriented programming environment whether object code is stored and executed locally or via internet, executed remotely.


  • Code-execution environment provides safe execution of code even if it is being created by semi-trusted third party.

  • .Net Framework’s code-execution environment has eliminated the performance problems of scripted or interpreted environments.

  • It provides consistent environment and developer experience across different types of applications, such as Windows-based applications and Web-based applications.

  • .NET Framework tries to ensure that it can be integrated with any other code.

The .NET Framework has 2 main components:

  • The common language runtime

  • .NET Framework class library

Common Language Runtime


Net Framework provides a run-time environment that executes the code and provides services for making the process of development easier. The common language runtime works as an agent that manages code at execution time, providing key services such as memory management, thread management, and remoting. .Net Framework compilers and tools help the developers to target the principle of runtime environment by providing managed code approach for developing applications. Benefits of managed code targeting runtime include cross-language integration, exception handling, enhanced security, versioning support, and debugging and profiling services.
Other features of common language runtime:

  • Cross Language Inheritance

  • Garbage Collection and automatic memory allocation and release

  • Self describing objects

  • Ability to run once compiled version on any CPU or Operating system that supports the runtime.

.Net Framework Class Library


The .Net Framework includes classes, interfaces, value types that facilitate the development environment to integrate with system functionality. .Net Framework components, controls and applications all are built upon using these class libraries. Functions of Class Library types include:

  • Represent base data types and exceptions.

  • Encapsulate data structures.

  • Perform Input/Output (I/O).

  • Access information about loaded types.

  • .NET Framework security checks.

  • Provide data access and provide rich and controlled GUI.

Thursday, January 5, 2012

What is ADO.NET?

0 comments


What is ADO.NET?


<!--> Normal 0 false false false EN-US X-NONE X-NONE

ADO.NET, an object oriented data access technology,

ADO.NET is collection of classes used to communicate between an application and a database.

Components of ADO.NET Architecture

The two basic components of this architecture are:

1. Data Provider

2. Dataset

Data Provider

The Data Provider is responsible for providing and maintaining the connection to the database.

A Data Provider is a set of related components that work together to provide data in an efficient and performance driven manner.

The .NET Framework currently comes with two Data Providers:

1. SQL Data Provider which is designed only to work with Microsoft's SQL Server 7.0 or later

2. OleDb Data Provider which allows us to connect to other types of databases like Access and Oracle.

Each Data Provider consists of the following component classes:

1. Connection

2. Command

3. DataReader

4. DataAdapter

The Connection object which provides a connection to the database
The Command object which is used to execute a command (Sql query, stored procedure)
The DataReader object which provides a forward-only, read only, connected recordset
The DataAdapter object which populates a disconnected DataSet with data and performs update

Connection

The Connection object establishes a connection to the database using the user name, password and the database name as parameters. The following are the supported Connection classes:

1. OleDbConnection

2. OdbcConnection

3. OracleConnection

4. SqlConnection

Command

The Command object is used to send the SQL Statements to the database.

Commands are used to insert data, retrieve data and execute stored procedures in the database. The following are the methods of the Command class:

1. ExecuteScalar

2. ExecuteReader

3. ExecuteNonQuery

4. ExecuteXmlReader

The ExecuteScalar method returns a single value from a query. This is faster compared to using ExecuteReader and is the preferred choice to retrieve a single value from a database table.

The ExecuteReader method returns a single record at a time.

The ExecuteNonQuery is used to change the state of a table. It can be used to insert, update or delete records from the table. ExecuteNonQuery can also be used to execute stored procedures.

The ExecuteXmlReader method returns an XmlReader object.

The ExecuteNonQuery method returns an integer representing the number of rows affected in the operation.

DataReader

A DataReader is a connected, forward only, read only stream of data that is retrieved from the database. The DataReader requires an open connection so it works in the connected mode.

DataReader objects cannot be directly instantiated. Rather, the DataReader is returned as the result of the Command object's ExecuteReader method. The SqlCommand.ExecuteReader method returns a SqlDataReader object, and the OleDbCommand.ExecuteReader method returns an OleDbDataReader object.

The DataReader can provide rows of data directly to application logic when you do not need to keep the data cached in memory. Because only one row is in memory at a time, the DataReader provides the lowest overhead in terms of system performance but requires the exclusive use of an open Connection object for the lifetime of the DataReader.

A DataReader is much faster compared to the disconnected DataSet, but it does require an open available connection.

DataAdapter

The DataAdapter is a bridge between the DataSet and the database.

It provides a set of methods and properties to move data to and from between a database and its in-memory representation, the DataSet.

It is also used to update the data in the database with the data in the DataSet. The following are two of the most important methods of the DataAdapter class:

1. Fill

2. Update

The DataAdapter is used either to fill a DataSet or Data Table with data from the database with its Fill method.

The Update method of the DataAdapter class commits the changes back to the database.

The DataAdapter provides the following commands:

1. SelectCommand

2. InsertCommand

3. UpdateCommand

4. DeleteCommand

DataSet

1. A DataSet is an in-memory, disconnected representation of the database.

2. It can be considered as a local copy of the relevant portions of the database.

3. The DataSet is persisted in memory and the data in it can be manipulated and updated independent of the database.

4. When the use of this DataSet is finished, changes can be made back to the central database for updating.

5. The data in DataSet can be loaded from any valid data source like Microsoft SQL server database, an Oracle database or from a Microsoft Access database.

6. The following are some of its features:

Disconnected

Tracks changes to the data

XML support

Caches Data locally




for more inquiry about classes call @9619979219

Friday, December 30, 2011

ASP.NET, ASP.NET MVC, C#.NET, ADO.NET,WINDOWS APPLICATION, WEB APPLICATION

0 comments
TO MAKE CAREER IN DOT NET TECHNOLOGY
one should know the following things
  • javascript
  • c#.net
  • vb.net
  • ado.net
  • asp.net
  • asp.net mvc
  • java script(surprised)
for more information call on :9619979219(only for mumbai people)

Followers

 

Teaching Dot Net. Copyright 2012 All Rights Reserved

Managed By Abhishek Pathak