Friday, November 26, 2010

Basic of Asp.net

What is ASP.NET?

ASP.NET is a server side scripting technology that enables scripts (embedded in web pages) to be executed by an Internet server.

  • ASP.NET is a Microsoft Technology
  • ASP stands for Active Server Pages
  • ASP.NET is a program that runs inside IIS
  • IIS (Internet Information Services) is Microsoft's Internet server
  • IIS comes as a free component with Windows servers
  • IIS is also a part of Windows 2000 and XP Professional

What is an ASP.NET File?

  • An ASP.NET file is just the same as an HTML file
  • An ASP.NET file can contain HTML, XML, and scripts
  • Scripts in an ASP.NET file are executed on the server
  • An ASP.NET file has the file extension ".aspx"

How Does ASP.NET Work?

  • When a browser requests an HTML file, the server returns the file
  • When a browser requests an ASP.NET file, IIS passes the request to the ASP.NET engine on the server
  • The ASP.NET engine reads the file, line by line, and executes the scripts in the file
  • Finally, the ASP.NET file is returned to the browser as plain HTML

What is ASP+?

ASP+ is the same as ASP.NET.

ASP+ is just an early name used by Microsoft when they developed ASP.NET.

Monday, November 22, 2010

Paging in Datalist

Today, we will learn how we can add the paging feature for the datalist. It should be noted that, like DataGrid, DataList does not support inbuilt paging mechanism. The essence of this article is how we make use of the object SqlDataAdapter. This object has a method called, Fill which is used to add or refresh the rows in a DataSet. Actually the method Fill is overloaded. We will be mainly concentrating the one which takes four arguments. The four arguments are DataSet, startRecord, maxRecords and the TableName. Second and third arguments are integer. Where as the TableName is the table name. So, if we say objDV.Fill(objDS, 0, 5, "sales"). The dataset will be filled with 5 records and the starting position will be from the first record. First, we are bringing the entire records from the table sales, and then we filter those with the help of startRecord and maxRecords. For our example, we will consider the table, Sales from the pubs database (SQL Server 2000).