<?xml version="1.0" encoding="UTF-16"?>
<rss version="2.0"><channel><title>SoftXML | ASPNET Tutorials</title><link>http://www.softxml.com/rss/tutorials/aspnet.xml</link><description>Tutorials</description><pubDate>Sun, 11 Jan 2009 14:27:49 EST</pubDate><language>en-us</language><image><title>SoftXML | ASPNET Tutorials</title><url>http://www.softxml.com/images/rsscategory.gif</url><link>http://www.softxml.com/rss/tutorials/aspnet.xml</link><width>80</width><height>73</height></image><item><title>ASP.NET Introduction</title><link>http://www.softxml.com/LearnTutorial.asp?id=46184132387&amp;f=aspnet&amp;fo=tutorials</link><description>&lt;p class="intro"&gt;ASP.NET is the latest version of Microsoft's Active Server Pages 
	technology (ASP).&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;What You Should Already Know&lt;/h2&gt;
&lt;p&gt;Before you continue you should have a basic understanding of the following:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		WWW, HTML, XML and the basics of building Web pages&lt;/li&gt;
	&lt;li&gt;
		Scripting languages like JavaScript or VBScript&lt;/li&gt;
	&lt;li&gt;
		The basics of server side scripting like ASP or PHP&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you want to study these subjects first, find the tutorials on our &lt;a href="http://www.w3schools.com/default.asp" target="_top"&gt;
		Home Page&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;What is Classic ASP?&lt;/h2&gt;
&lt;p&gt;Microsoft's previous server side scripting technology ASP (Active Server Pages) 
	is now often called classic ASP.
&lt;/p&gt;
&lt;p&gt;ASP 3.0 was the last version of the classic ASP.&lt;/p&gt;
&lt;p&gt;To learn more about classic ASP, you can study our &lt;a href="http://www.w3schools.com/asp/default.asp"&gt;
		ASP tutorial&lt;/a&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;ASP.NET is Not ASP&lt;/h2&gt;
&lt;p&gt;ASP.NET is the next generation ASP, but it's not an upgraded version of ASP.
&lt;/p&gt;
&lt;p&gt;ASP.NET is an entirely new technology for server-side scripting. It was written 
	from the ground up and is not backward compatible with classic ASP.&lt;/p&gt;
&lt;p&gt;You can read more about the differences between ASP and ASP.NET in the next 
	chapter of this tutorial.&lt;/p&gt;
&lt;p&gt;ASP.NET is the major part of the Microsoft's .NET Framework.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;What is ASP.NET?&lt;/h2&gt;
&lt;p&gt;ASP.NET is a server side scripting technology that enables scripts (embedded in 
	web pages) to be executed by an Internet server.&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		ASP.NET is a Microsoft Technology&lt;/li&gt;
	&lt;li&gt;
		ASP stands for Active Server Pages&lt;/li&gt;
	&lt;li&gt;
		ASP.NET is a program that runs inside IIS&lt;/li&gt;
	&lt;li&gt;
		IIS (Internet Information Services) is Microsoft's Internet server&lt;/li&gt;
	&lt;li&gt;
		IIS comes as a free component with Windows servers&lt;/li&gt;
	&lt;li&gt;
		IIS is also a part of Windows 2000 and XP Professional&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;What is an ASP.NET File?&lt;/h2&gt;
&lt;ul&gt;
	&lt;li&gt;
		An ASP.NET file is just the same as an HTML file&lt;/li&gt;
	&lt;li&gt;
		An ASP.NET file can contain HTML, XML, and scripts&lt;/li&gt;
	&lt;li&gt;
		Scripts in an ASP.NET file are executed on the server&lt;/li&gt;
	&lt;li&gt;
		An ASP.NET file has the file extension ".aspx"&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;How Does ASP.NET Work?&lt;/h2&gt;
&lt;ul&gt;
	&lt;li&gt;
		When a browser requests an HTML file, the server returns the file&lt;/li&gt;
	&lt;li&gt;
		When a browser requests an ASP.NET file, IIS passes the request to the ASP.NET 
		engine on the server&lt;/li&gt;
	&lt;li&gt;
		The ASP.NET engine reads the file, line by line, and executes the scripts in 
		the file&lt;/li&gt;
	&lt;li&gt;
		Finally, the ASP.NET file is returned to the browser as plain HTML&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2&gt;&lt;b&gt;What is ASP+?&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;ASP+ is the same as ASP.NET.&lt;/p&gt;
&lt;p&gt;ASP+ is just an early name used by Microsoft when they developed ASP.NET.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;The Microsoft .NET Framework&lt;/h2&gt;
&lt;p&gt;The .NET Framework is the infrastructure for the Microsoft .NET platform.
&lt;/p&gt;
&lt;p&gt;The .NET Framework is an environment for building, deploying, and running Web 
	applications and Web Services.&lt;/p&gt;
&lt;p&gt;Microsoft's first server technology ASP (Active Server Pages), was a powerful 
	and flexible "programming language". But it was to much code oriented. It was 
	not an application framework and not an enterprise development tool.&lt;/p&gt;
&lt;p&gt;The Microsoft .NET Framework was developed to solve this problem.
&lt;/p&gt;
&lt;p&gt;&lt;b&gt;.NET Frameworks keywords:&lt;/b&gt;&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		Easier and quicker programming&lt;/li&gt;
	&lt;li&gt;
		Reduced amount of code&lt;/li&gt;
	&lt;li&gt;
		Declarative programming model&lt;/li&gt;
	&lt;li&gt;
		Richer server control hierarchy with events&lt;/li&gt;
	&lt;li&gt;
		Larger class library&lt;/li&gt;
	&lt;li&gt;
		Better support for development tools&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;b&gt;The .NET Framework consists of 3 main parts:&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Programming languages:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		C# (Pronounced C sharp)&lt;/li&gt;
	&lt;li&gt;
		Visual Basic (VB .NET)&lt;/li&gt;
	&lt;li&gt;
		J# (Pronounced J sharp)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Server technologies and client technologies:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		ASP .NET (Active Server Pages)&lt;/li&gt;
	&lt;li&gt;
		Windows Forms (Windows desktop solutions)&lt;/li&gt;
	&lt;li&gt;
		Compact Framework (PDA / Mobile solutions)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Development environments:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;
		Visual Studio .NET (VS .NET)&lt;/li&gt;
	&lt;li&gt;
		Visual Web Developer&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This tutorial is about ASP.NET.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;ASP.NET 2.0&lt;/h2&gt;
&lt;p&gt;ASP.NET 2.0 improves upon ASP.NET by adding support for several new features.&lt;/p&gt;
&lt;p&gt;You can read more about the differences between ASP.NET 2.0 and ASP.</description><guid>http://www.softxml.com/LearnTutorial.asp?id=46184132387&amp;f=aspnet&amp;fo=tutorials</guid><category>aspnet</category></item><item><title>Differences between ASP and ASP.NET</title><link>http://www.softxml.com/LearnTutorial.asp?id=350116966&amp;f=aspnet&amp;fo=tutorials</link><description>&lt;p class="intro"&gt;ASP.NET has better language support, a large set of new controls 
and XML based
components, and better user authentication.&lt;/p&gt;
&lt;p class="intro"&gt;ASP.NET provides increased performance by running compiled code.&lt;/p&gt;
&lt;p class="intro"&gt;ASP.NET code is not fully backward compatible with ASP.&lt;/p&gt;
&lt;hr&gt;

&lt;h2&gt;New in ASP.NET&lt;/h2&gt;
&lt;ul type="square"&gt;
  &lt;li&gt;Better language support&lt;/li&gt;
  &lt;li&gt;Programmable controls&lt;/li&gt;
  &lt;li&gt;Event-driven programming&lt;/li&gt;
  &lt;li&gt;XML-based components&lt;/li&gt;
  &lt;li&gt;User authentication, with accounts and roles&lt;/li&gt;
  &lt;li&gt;Higher scalability&lt;/li&gt;
  &lt;li&gt;Increased performance - Compiled code&lt;/li&gt;
  &lt;li&gt;Easier configuration and deployment&lt;/li&gt;
  &lt;li&gt;Not fully ASP compatible&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2&gt;Language Support&lt;/h2&gt;

&lt;p&gt;ASP.NET uses the new ADO.NET.&lt;/p&gt;

&lt;p&gt;ASP.NET supports full Visual Basic, not VBScript.&lt;/p&gt;

&lt;p&gt;ASP.NET supports C# (C sharp) and C++.&lt;/p&gt;

&lt;p&gt;ASP.NET supports JScript as before.&lt;/p&gt;

&lt;hr&gt;
&lt;h2&gt;ASP.NET Controls&lt;/h2&gt;
&lt;p&gt;ASP.NET contains a large set of HTML controls. Almost all
HTML elements on a page can be defined as ASP.NET control objects that can be
controlled by scripts.&lt;/p&gt;
&lt;p&gt;ASP.NET also contains a new set of object oriented input controls, like programmable list
boxes and validation controls.&lt;/p&gt;
&lt;p&gt;A new data grid control supports sorting,
data paging, and everything you expect from a dataset control.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Event Aware Controls&lt;/h2&gt;

&lt;p&gt;All ASP.NET objects on a Web page can expose events that can be processed by
ASP.NET code.&lt;/p&gt;

&lt;p&gt;Load, Click and Change events handled by code makes
coding much simpler and much better organized.&lt;/p&gt;

&lt;hr&gt;
&lt;h2&gt;ASP.NET Components&lt;/h2&gt;
&lt;p&gt;ASP.NET components are heavily based on XML. Like the new AD Rotator, that
uses XML to store advertisement information and configuration.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;User Authentication&lt;/h2&gt;

&lt;p&gt;ASP.NET supports forms-based user authentication, including cookie management 
and automatic redirecting
of unauthorized logins.&lt;/p&gt;

&lt;p&gt;(You can still do your custom login page and custom user checking).&lt;/p&gt;

&lt;hr&gt;
&lt;h2&gt;User Accounts and Roles&lt;/h2&gt;

&lt;p&gt;AS .NET allows for user accounts and roles, to give each user (with a given
role) access to different server code and executables.&lt;/p&gt;

&lt;hr&gt;
&lt;h2&gt;High Scalability&lt;/h2&gt;

&lt;p&gt;Much has been done with ASP.NET to provide greater scalability.&lt;/p&gt;

&lt;p&gt;Server to server communication has been greatly enhanced, making it possible
to scale an application over several servers. One example of this is the ability
to run XML parsers, XSL transformations and even resource hungry session objects
on other servers.&lt;/p&gt;

&lt;hr&gt;
&lt;h2&gt;Compiled Code&lt;/h2&gt;
&lt;p&gt;The first request for an ASP.NET page on the server will compile the ASP.NET code
and keep a cached copy in memory. The result of this is greatly increased
performance.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Easy Configuration&lt;/h2&gt;

&lt;p&gt;Configuration of ASP.NET is done with plain text files.&lt;/p&gt;

&lt;p&gt;Configuration files
can be uploaded or changed while the application is running. No need to restart
the server. No more metabase or registry puzzle.&lt;/p&gt;

&lt;hr&gt;
&lt;h2&gt;Easy Deployment&lt;/h2&gt;

&lt;p&gt;No more server restart to deploy or replace compiled code. ASP.NET simply
redirects all new requests to the new code.</description><guid>http://www.softxml.com/LearnTutorial.asp?id=350116966&amp;f=aspnet&amp;fo=tutorials</guid><category>aspnet</category></item><item><title>Installing ASP.NET</title><link>http://www.softxml.com/LearnTutorial.asp?id=31330435903&amp;f=aspnet&amp;fo=tutorials</link><description>&lt;p class="intro"&gt;ASP.NET is easy to install. Just follow the instructions below.&lt;/p&gt;
&lt;hr&gt;

&lt;h2&gt;What You Need&lt;/h2&gt;
&lt;h3&gt;A Windows Computer&lt;/h3&gt;
&lt;p&gt;ASP.NET is a Microsoft technology. To run ASP.NET you need a computer capable 
of running Windows.&lt;/p&gt;
&lt;h3&gt;Windows 2000 or XP&lt;/h3&gt;
&lt;p&gt;If you are serious about developing ASP.NET applications you should install 
Windows 2000 Professional or Windows XP Professional.&lt;/p&gt;
&lt;p&gt;In both cases, make sure you install the Internet Information 
Services (IIS) from the Add/Remove Windows components dialog.&lt;/p&gt;
&lt;h3&gt;Service Packs and Updates&lt;/h3&gt;
&lt;p&gt;Before ASP.NET can be installed on your computer, it is necessary to have all 
relevant service packs and security updates installed.&lt;/p&gt;
&lt;p&gt;The easiest way to do this is to activate your Windows Internet Update. When 
you access the Windows Update page, you will be instructed to install the latest 
service packs and all critical security updates. For Windows 2000, make sure you 
install Service Pack 2. I will also recommend that you install Internet Explorer 
6.&lt;/p&gt;
&lt;p&gt;Read the note about connection speed and download time at the bottom of this 
page.&lt;/p&gt;
&lt;hr&gt;

&lt;h2&gt;Remove Your Beta Version&lt;/h2&gt;
&lt;p&gt;If you have a Beta version of ASP.NET installed, we recommend 
that you completely uninstall it. Or even better: start with a fresh Windows 
2000 or XP installation.&lt;/p&gt;

&lt;hr&gt;
&lt;h2&gt;Install .NET&lt;/h2&gt;
&lt;p&gt;From your Windows Update you can now select to install the Microsoft .NET 
Framework.&lt;/p&gt;
&lt;p&gt;After download, the .NET framework will install itself on your computer - 
there are no options to select for installation. &lt;/p&gt;
&lt;p&gt;&lt;b&gt;You should now be ready to develop your first ASP.NET application!&lt;/b&gt;&lt;/p&gt;

&lt;hr&gt;
&lt;h2&gt;The .NET Software Development Kit&lt;/h2&gt;
&lt;p&gt;If you have the necessary bandwidth to download over 130 MB, you might 
consider downloading the full Microsoft .NET Software Development Kit (SDK). &lt;/p&gt;
&lt;p&gt;We fully recommend getting 
the SDK for learning more about .NET and for the documentation, samples, and tools 
included.</description><guid>http://www.softxml.com/LearnTutorial.asp?id=31330435903&amp;f=aspnet&amp;fo=tutorials</guid><category>aspnet</category></item><item><title>ASP.NET - Web Pages</title><link>http://www.softxml.com/LearnTutorial.asp?id=41657834213&amp;f=aspnet&amp;fo=tutorials</link><description>&lt;p class="intro"&gt;A simple ASP.NET page looks just like an ordinary HTML page.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Hello ASP.Net&lt;/h2&gt;
&lt;p&gt;To start learning ASP.NET, we will construct a very simple HTML page that will 
	display "Hello ASP.Net" in an Internet browser like this:&lt;/p&gt;
&lt;table bgcolor="yellow" border="1" width="100%" ID="Table1"&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td align="center"&gt;
				&lt;h2&gt;Hello ASP.Net!&lt;/h2&gt;
				&lt;p&gt;
				&lt;/p&gt;
				&lt;p&gt;
				&lt;/p&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;br&gt;
&lt;hr&gt;
&lt;h2&gt;Hello ASP.Net in HTML&lt;/h2&gt;
&lt;p&gt;This code displays the example as an HTML page:&lt;/p&gt;
&lt;table class="ex" border="1" width="100%" ID="Table2"&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td&gt;
				&lt;pre&gt;&amp;lt;html&amp;gt;
&amp;lt;body bgcolor="yellow"&amp;gt;
&amp;lt;center&amp;gt;
&amp;lt;h2&amp;gt;Hello ASP.Net!&amp;lt;/h2&amp;gt;
&amp;lt;/center&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;If you want to try it yourself, save the code in a file called "&lt;b&gt;firstpage.htm&lt;/b&gt;", 
	and create a link to the file like this: &lt;a target="_blank" href="http://www.w3schools.com/aspnet/firstpage.htm"&gt;
		firstpage.htm&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Hello ASP.Net in ASP.NET&lt;/h2&gt;
&lt;p&gt;The simplest way to convert an HTML page into an ASP.NET page is to copy the 
	HTML file to a new file with an &lt;b&gt;.aspx&lt;/b&gt; extension.&lt;/p&gt;
&lt;p&gt;This code displays our example as an ASP.NET page:&lt;/p&gt;
&lt;table class="ex" border="1" width="100%" ID="Table3"&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td&gt;
				&lt;pre&gt;&amp;lt;html&amp;gt;
&amp;lt;body bgcolor="yellow"&amp;gt;
&amp;lt;center&amp;gt;
&amp;lt;h2&amp;gt;Hello ASP.Net!&amp;lt;/h2&amp;gt;
&amp;lt;/center&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;If you want to try it yourself, save the code in a file called "&lt;b&gt;firstpage.aspx&lt;/b&gt;", 
	and create a link to the file like this: &lt;a target="_blank" href="http://www.w3schools.com/aspnet/firstpage.aspx"&gt;
		firstpage.aspx&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;How Does it Work?&lt;/h2&gt;
&lt;p&gt;Fundamentally an ASP.NET page is just the same as an HTML page.&lt;/p&gt;
&lt;p&gt;An HTML page has the extension .htm. If a browser requests an HTML page from the 
	server, the server sends the page to the browser without any modifications.&lt;/p&gt;
&lt;p&gt;An ASP.NET page has the extension .aspx. If a browser requests an ASP.NET page, 
	the server processes any executable code in the page, before the result is sent 
	back to the browser.&lt;/p&gt;
&lt;p&gt;The ASP.NET page above does not contain any executable code, so nothing is 
	executed. In the next examples we will add some executable code to the page to 
	demonstrate the difference between static HTML pages and dynamic ASP pages.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Classic ASP&lt;/h2&gt;
&lt;p&gt;Active Server Pages (ASP) has been around for several years. With ASP, 
	executable code can be placed inside HTML pages.&lt;/p&gt;
&lt;p&gt;Previous versions of ASP (before ASP .NET) are often called Classic ASP.&lt;/p&gt;
&lt;p&gt;ASP.NET is not fully compatible with Classic ASP, but most Classic ASP pages 
	will work fine as ASP.NET pages, with only minor changes.&lt;/p&gt;
&lt;p&gt;If you want to learn more about Classic ASP, please visit our &lt;a href="http://www.w3schools.com/asp/default.asp"&gt;
		ASP Tutorial&lt;/a&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Dynamic Page in Classic ASP&lt;/h2&gt;
&lt;p&gt;To demonstrate how ASP can display pages with dynamic content, we have added 
	some executable code (in red) to the previous example:&lt;/p&gt;
&lt;table class="ex" border="1" width="100%" ID="Table4"&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td&gt;
				&lt;pre&gt;&amp;lt;html&amp;gt;
&amp;lt;body bgcolor="yellow"&amp;gt;
&amp;lt;center&amp;gt;
&amp;lt;h2&amp;gt;Hello ASP.Net!&amp;lt;/h2&amp;gt;
&amp;lt;p&amp;gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;%Response.Write(now())%&amp;gt;&lt;/span&gt;&amp;lt;/p&amp;gt;
&amp;lt;/center&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The code inside the &amp;lt;% --%&amp;gt; tags is executed on the server.&lt;/p&gt;
&lt;p&gt;Response.Write is ASP code for writing something to the HTML output stream.&lt;/p&gt;
&lt;p&gt;Now() is a function returning the servers current date and time.&lt;/p&gt;
&lt;p&gt;If you want to try it yourself, save the code in a file called "&lt;b&gt;dynpage.asp&lt;/b&gt;", 
	and create a link to the file like this: &lt;a target="_blank" href="http://www.w3schools.com/aspnet/dynpage.asp"&gt;
		dynpage.asp&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Dynamic Page in ASP .NET&lt;/h2&gt;
&lt;p&gt;This following code displays our example as an ASP.NET page:&lt;/p&gt;
&lt;table class="ex" border="1" width="100%" ID="Table5"&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td&gt;
				&lt;pre&gt;&amp;lt;html&amp;gt;
&amp;lt;body bgcolor="yellow"&amp;gt;
&amp;lt;center&amp;gt;
&amp;lt;h2&amp;gt;Hello ASP.Net!&amp;lt;/h2&amp;gt;
&amp;lt;p&amp;gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;%Response.Write(now())%&amp;gt;&lt;/span&gt;&amp;lt;/p&amp;gt;
&amp;lt;/center&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;If you want to try it yourself, save the code in a file called "&lt;b&gt;dynpage.aspx&lt;/b&gt;", 
	and create a link to the file like this: &lt;a target="_blank" href="http://www.w3schools.com/aspnet/dynpage.aspx"&gt;
		dynpage.</description><guid>http://www.softxml.com/LearnTutorial.asp?id=41657834213&amp;f=aspnet&amp;fo=tutorials</guid><category>aspnet</category></item><item><title>ASP.NET - Server Controls</title><link>http://www.softxml.com/LearnTutorial.asp?id=13124050979&amp;f=aspnet&amp;fo=tutorials</link><description>&lt;p class="intro"&gt;Server controls are tags that are understood by the server.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Limitations in Classic ASP&lt;/h2&gt;
&lt;p&gt;The listing below was copied from the previous chapter:&lt;/p&gt;
&lt;table class="ex" border="1" width="100%" ID="Table1"&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td&gt;
				&lt;pre&gt;&amp;lt;html&amp;gt;
&amp;lt;body bgcolor="yellow"&amp;gt;
&amp;lt;center&amp;gt;
&amp;lt;h2&amp;gt;Hello W3Schools!&amp;lt;/h2&amp;gt;
&amp;lt;p&amp;gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&amp;lt;%Response.Write(now())%&amp;gt;&lt;/span&gt;&amp;lt;/p&amp;gt;
&amp;lt;/center&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The code above illustrates a limitation in Classic ASP: The code block has to be 
	placed where you want the output to appear.
&lt;/p&gt;
&lt;p&gt;With Classic ASP it is impossible to separate executable code from the HTML 
	itself. This makes the page difficult to read, and difficult to maintain.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;ASP.NET - Server Controls&lt;/h2&gt;
&lt;p&gt;ASP.NET has solved the "spaghetti-code" problem described above with &lt;strong&gt;&lt;span style="font-weight: 400;"&gt;
			s&lt;/span&gt;&lt;/strong&gt;&lt;strong style="font-weight: 400;"&gt;erver controls&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Server controls are tags that are understood by the server.&lt;/p&gt;
&lt;p&gt;There are three kinds of server controls:&lt;/p&gt;
&lt;ul type="square"&gt;
	&lt;li&gt;
		HTML Server Controls - Traditional HTML tags&lt;/li&gt;
	&lt;li&gt;
		Web Server Controls - New ASP.NET tags
	&lt;/li&gt;
	&lt;li&gt;
		Validation Server Controls - For input validation
	&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2&gt;ASP.NET - HTML Server Controls&lt;/h2&gt;
&lt;p&gt;HTML server controls are HTML tags understood by the server.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Note:&lt;/b&gt; All HTML server controls must be within a &amp;lt;form&amp;gt; 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.&lt;/p&gt;
&lt;p&gt;In the following example we declare an HtmlAnchor server control in an .aspx 
	file. Then we manipulate the HRef attribute of the HtmlAnchor control in an 
	event handler (an event handler is a subroutine that executes code for a given 
	event). The Page_Load event is one of many events that ASP.NET understands:&lt;/p&gt;
&lt;table class="ex" border="1" width="100%" ID="Table2"&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td&gt;
				&lt;pre&gt;&amp;lt;script runat="server"&amp;gt;
Sub Page_Load
link1.HRef="http://www.w3schools.com"
End Sub
&amp;lt;/script&amp;gt;&lt;/pre&gt;
				&lt;pre&gt;&amp;lt;html&amp;gt;
&amp;lt;body&amp;gt;&lt;/pre&gt;
				&lt;pre&gt;&amp;lt;form runat="server"&amp;gt;
&amp;lt;a id="link1" runat="server"&amp;gt;Visit W3Schools!&amp;lt;/a&amp;gt;
&amp;lt;/form&amp;gt;&lt;/pre&gt;
				&lt;pre&gt;&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The executable code itself has been moved outside the HTML.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;ASP.NET - Web Server Controls&lt;/h2&gt;
&lt;p&gt;Web server controls are special ASP.NET tags understood by the server.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The syntax for creating a Web server control is:&lt;/p&gt;
&lt;table class="ex" border="1" width="100%" ID="Table3"&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td&gt;
				&lt;pre&gt;&amp;lt;asp:control_name id="some_id" runat="server" /&amp;gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;In the following example we declare a Button server control in an .aspx file. 
	Then we create an event handler for the Click event which changes the text on 
	the button:&lt;/p&gt;
&lt;table class="ex" border="1" width="100%" ID="Table4"&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td&gt;
				&lt;pre&gt;&amp;lt;script runat="server"&amp;gt;
Sub submit(Source As Object, e As EventArgs)
button1.Text="You clicked me!"
End Sub
&amp;lt;/script&amp;gt;&lt;/pre&gt;
				&lt;pre&gt;&amp;lt;html&amp;gt;
&amp;lt;body&amp;gt;&lt;/pre&gt;
				&lt;pre&gt;&amp;lt;form runat="server"&amp;gt;
&amp;lt;asp:Button id="button1" Text="Click me!"
runat="server" OnClick="submit"/&amp;gt;
&amp;lt;/form&amp;gt;&lt;/pre&gt;
				&lt;pre&gt;&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;br&gt;
&lt;hr&gt;
&lt;h2&gt;ASP.NET - Validation Server Controls&lt;/h2&gt;
&lt;p&gt;Validation server controls is used to validate user-input. If the user-input 
	does not pass validation, it will display an error message to the user.&lt;/p&gt;
&lt;p&gt;Each validation control performs a specific type of validation (like validating 
	against a specific value or a range of values).&lt;/p&gt;
&lt;p&gt;By default, page validation is performed when a Button, ImageButton, or 
	LinkButton control is clicked. You can prevent validation when a button control 
	is clicked by setting the CausesValidation property to false.&lt;/p&gt;
&lt;p&gt;The syntax for creating a Validation server control is:&lt;/p&gt;
&lt;table class="ex" border="1" width="100%" ID="Table5"&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td&gt;
				&lt;pre&gt;&amp;lt;asp:control_name id="some_id" runat="server" /&amp;gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;In the following example we declare one TextBox control, one Button control, and 
	one RangeValidator control in an .aspx file.</description><guid>http://www.softxml.com/LearnTutorial.asp?id=13124050979&amp;f=aspnet&amp;fo=tutorials</guid><category>aspnet</category></item><item><title>ASP.NET - Events</title><link>http://www.softxml.com/LearnTutorial.asp?id=26526930525&amp;f=aspnet&amp;fo=tutorials</link><description>&lt;p class="intro"&gt;An Event Handler is a subroutine that executes code for a given 
	event.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;ASP.NET - Event Handlers&lt;/h2&gt;
&lt;p&gt;Look at the following code:&lt;/p&gt;
&lt;table class="ex" border="1" width="100%" ID="Table1"&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td&gt;
				&lt;pre&gt;&amp;lt;%
lbl1.Text="The date and time is " &amp;amp; now()
%&amp;gt;&lt;/pre&gt;
				&lt;pre&gt;&amp;lt;html&amp;gt;
&amp;lt;body&amp;gt;
&amp;lt;form runat="server"&amp;gt;
&amp;lt;h3&amp;gt;&amp;lt;asp:label id="lbl1" runat="server" /&amp;gt;&amp;lt;/h3&amp;gt;
&amp;lt;/form&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;When will the code above be executed? The answer is: "You don't know..."&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;The Page_Load Event&lt;/h2&gt;
&lt;p&gt;The Page_Load event is one of many events that ASP.NET understands. The 
	Page_Load event is triggered when a page loads, and ASP.NET will automatically 
	call the subroutine Page_Load, and execute the code inside it:&lt;/p&gt;
&lt;table class="ex" border="1" width="100%" ID="Table2"&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td&gt;
				&lt;pre&gt;&amp;lt;script runat="server"&amp;gt;
Sub Page_Load
lbl1.Text="The date and time is " &amp;amp; now()
End Sub
&amp;lt;/script&amp;gt;&lt;/pre&gt;
				&lt;pre&gt;&amp;lt;html&amp;gt;
&amp;lt;body&amp;gt;
&amp;lt;form runat="server"&amp;gt;
&amp;lt;h3&amp;gt;&amp;lt;asp:label id="lbl1" runat="server" /&amp;gt;&amp;lt;/h3&amp;gt;
&amp;lt;/form&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
	&lt;b&gt;Note:&lt;/b&gt; The Page_Load event contains no object references or event 
	arguments!&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_pageload"&gt;Example&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;The Page.IsPostBack Property&lt;/h2&gt;
&lt;p&gt;
	The Page_Load subroutine runs EVERY time the page is loaded. If you want to 
	execute the code in the Page_Load subroutine only the FIRST time the page is 
	loaded, you can use the Page.IsPostBack property. If the Page.IsPostBack 
	property is false, the page is loaded for the first time, if it is true, the 
	page is posted back to the server (i.e. from a button click on a form):&lt;/p&gt;
&lt;table class="ex" border="1" width="100%" ID="Table3"&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;td&gt;
				&lt;pre&gt;&amp;lt;script runat="server"&amp;gt;
Sub Page_Load
if Not Page.IsPostBack then
  lbl1.Text="The date and time is " &amp;amp; now()
end if
End Sub&lt;/pre&gt;
				&lt;pre&gt;Sub Submit(s As Object, e As EventArgs)
lbl2.Text="Hello World!"
End Sub
&amp;lt;/script&amp;gt;&lt;/pre&gt;
				&lt;pre&gt;&amp;lt;html&amp;gt;
&amp;lt;body&amp;gt;
&amp;lt;form runat="server"&amp;gt;
&amp;lt;h3&amp;gt;&amp;lt;asp:label id="lbl1" runat="server" /&amp;gt;&amp;lt;/h3&amp;gt;
&amp;lt;h3&amp;gt;&amp;lt;asp:label id="lbl2" runat="server" /&amp;gt;&amp;lt;/h3&amp;gt;
&amp;lt;asp:button text="Submit" onclick="submit" runat="server" /&amp;gt;
&amp;lt;/form&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
	The example above will write the "The date and time is..</description><guid>http://www.softxml.com/LearnTutorial.asp?id=26526930525&amp;f=aspnet&amp;fo=tutorials</guid><category>aspnet</category></item><item><title>ASP.NET Web Forms</title><link>http://www.softxml.com/LearnTutorial.asp?id=43137423173&amp;f=aspnet&amp;fo=tutorials</link><description>&lt;p class="intro"&gt;All server controls must appear within a &amp;lt;form&amp;gt; tag, and the &amp;lt;form&amp;gt; tag must 
contain the runat="server" attribute.&lt;/p&gt;
&lt;hr&gt;

&lt;h2&gt;ASP.NET Web Forms&lt;/h2&gt;
&lt;p&gt;All server controls must appear within a &amp;lt;form&amp;gt; tag, and the &amp;lt;form&amp;gt; tag must 
contain 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:&lt;/p&gt;
&lt;table class="ex" border="1" width="100%" ID="Table1"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;form runat="server"&amp;gt;&lt;/pre&gt;
&lt;pre&gt;...HTML + server controls&lt;/pre&gt;
&lt;pre&gt;&amp;lt;/form&amp;gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;
&lt;b&gt;Note:&lt;/b&gt; The form is always submitted to the page itself. If you specify an 
action attribute, it is ignored. If you omit the method attribute, it will be 
set to method="post" by default. Also, if you do not specify the name and id 
attributes, they are automatically assigned by ASP.NET.&lt;/p&gt;

&lt;p&gt;
&lt;b&gt;Note:&lt;/b&gt; An .aspx page can only contain ONE &amp;lt;form runat="server"&amp;gt; control!&lt;/p&gt;

&lt;p&gt;
If you select view source in an .aspx page containing a form with no name, 
method, action, or id attribute specified, you will see that ASP.NET has added 
these attributes to the form. It looks something like this:&lt;/p&gt;

&lt;table class="ex" border="1" width="100%" ID="Table2"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;form name="_ctl0" method="post" action="page.aspx" id="_ctl0"&amp;gt;&lt;/pre&gt;
&lt;pre&gt;...some code&lt;/pre&gt;
&lt;pre&gt;&amp;lt;/form&amp;gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br&gt;
&lt;hr&gt;

&lt;h2&gt;Submitting a Form&lt;/h2&gt;

&lt;p&gt;
A form is most often submitted by clicking on a button. The Button server control 
in ASP.</description><guid>http://www.softxml.com/LearnTutorial.asp?id=43137423173&amp;f=aspnet&amp;fo=tutorials</guid><category>aspnet</category></item><item><title>ASP .NET Maintaining the ViewState</title><link>http://www.softxml.com/LearnTutorial.asp?id=41787421894&amp;f=aspnet&amp;fo=tutorials</link><description>&lt;p class="intro"&gt;You may save a lot of coding by maintaining the ViewState of 
the objects in your Web Form.&lt;/p&gt;
&lt;hr&gt;

&lt;h2&gt;Maintaining the  ViewState&lt;/h2&gt;

&lt;p&gt;
When a form is submitted in classic ASP, all form values are cleared. Suppose you 
have submitted a form with a lot of information and the server comes back with an error. 
You will have to go back to the form and correct the information. You click the 
back button, and what happens.......ALL form values are CLEARED, and you will have to start all over 
again! The site did not maintain your ViewState.&lt;/p&gt;

&lt;p&gt;
When a form is submitted in ASP .NET, the form reappears in the browser
window together with all form values. How come? This is because ASP
.NET maintains your ViewState.
The ViewState indicates the status of the page when submitted to the
server. The status is defined through a hidden field placed on each
page with a &amp;lt;form runat="server"&amp;gt; control. The source could look
something like this:&lt;/p&gt;

&lt;table class="ex" border="1" width="100%" ID="Table1"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;form name="_ctl0" method="post" action="page.aspx" id="_ctl0"&amp;gt;
&amp;lt;input type="hidden" name="__VIEWSTATE"
value="dDwtNTI0ODU5MDE1Ozs+ZBCF2ryjMpeVgUrY2eTj79HNl4Q=" /&amp;gt;&lt;/pre&gt;
&lt;pre&gt;.....some code&lt;/pre&gt;
&lt;pre&gt;&amp;lt;/form&amp;gt;&lt;/pre&gt;
  &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;
Maintaining the ViewState is the default setting for ASP.NET Web Forms. If you 
want to NOT 
maintain the ViewState, include the directive &amp;lt;%@ Page EnableViewState="false" %&amp;gt; at the top of 
an .aspx page or add the attribute EnableViewState="false" to any control.&lt;/p&gt;

&lt;p&gt;
Look at the following .aspx file. It demonstrates the "old" way to do it. When 
you click on the submit button, the form value will disappear: &lt;/p&gt;

&lt;table class="ex" border="1" width="100%" ID="Table2"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;html&amp;gt;
&amp;lt;body&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;form action="demo_classicasp.aspx" method="post"&amp;gt;
Your name: &amp;lt;input type="text" name="fname" size="20"&amp;gt;
&amp;lt;input type="submit" value="Submit"&amp;gt;
&amp;lt;/form&amp;gt;
&amp;lt;%
dim fname
fname=Request.Form("fname")
If fname&amp;lt;&amp;gt;"" Then
Response.Write("Hello " &amp;amp; fname &amp;amp; "!")
End If
%&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;
  &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_classicasp"&gt;Example&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
Here is the new ASP .NET way. When you click on the submit button, the form 
value will NOT disappear:&lt;/p&gt;

&lt;table class="ex" border="1" width="100%" ID="Table3"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;script runat="server"&amp;gt;
Sub submit(sender As Object, e As EventArgs)
lbl1.Text="Hello " &amp;amp; txt1.</description><guid>http://www.softxml.com/LearnTutorial.asp?id=41787421894&amp;f=aspnet&amp;fo=tutorials</guid><category>aspnet</category></item><item><title>ASP .NET - The TextBox Control</title><link>http://www.softxml.com/LearnTutorial.asp?id=37377956842&amp;f=aspnet&amp;fo=tutorials</link><description>&lt;p class="intro"&gt;The TextBox control is used to create a text box where the user 
can input text.&lt;/p&gt;
&lt;hr&gt;

&lt;h2&gt;The TextBox Control&lt;/h2&gt;
&lt;p&gt;The TextBox control is used to create a text box where the user 
can input text.&lt;/p&gt;
&lt;p&gt;The TextBox control's attributes and properties are listed in our
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/aspnet_refwebcontrols.asp"&gt;web controls reference page&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The example below demonstrates some of the attributes you may use with the TextBox 
control:&lt;/p&gt;

&lt;p&gt;&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_textbox_ex1"&gt;Example&lt;/a&gt;&lt;/p&gt;
&lt;table class="ex" border="1" width="100%" ID="Table1"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;html&amp;gt;
&amp;lt;body&amp;gt;

&amp;lt;form runat="server"&amp;gt;

A basic TextBox:
&amp;lt;asp:TextBox id="tb1" runat="server" /&amp;gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;

A password TextBox:
&amp;lt;asp:TextBox id="tb2" TextMode="password" runat="server" /&amp;gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;

A TextBox with text:
&amp;lt;asp:TextBox id="tb4" Text="Hello World!" runat="server" /&amp;gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;

A multiline TextBox:
&amp;lt;asp:TextBox id="tb3" TextMode="multiline" runat="server" /&amp;gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;

A TextBox with height:
&amp;lt;asp:TextBox id="tb6" rows="5" TextMode="multiline"
runat="server" /&amp;gt;
&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;

A TextBox with width:
&amp;lt;asp:TextBox id="tb5" columns="30" runat="server" /&amp;gt;

&amp;lt;/form&amp;gt;

&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;
  &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;br&gt;
&lt;hr&gt;

&lt;h2&gt;Add a Script&lt;/h2&gt;

&lt;p&gt;The contents and settings of a TextBox control may be changed by server 
scripts when a form is submitted. A form can be submitted by clicking on a 
button or when a user changes the value in the TextBox control.&lt;/p&gt;

&lt;p&gt;In the following example we declare one TextBox 
control, one Button control, and one Label control in an .aspx file. When the 
submit button is triggered, the submit subroutine is executed. The submit 
subroutine writes a text to the Label control:&lt;/p&gt;

&lt;table class="ex" border="1" width="100%" ID="Table2"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;script runat="server"&amp;gt;
Sub submit(sender As Object, e As EventArgs)
lbl1.Text="Your name is " &amp;amp; txt1.Text
End Sub
&amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;html&amp;gt;
&amp;lt;body&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;form runat="server"&amp;gt;
Enter your name:
&amp;lt;asp:TextBox id="txt1" runat="server" /&amp;gt;
&amp;lt;asp:Button OnClick="submit" Text="Submit" runat="server" /&amp;gt;
&amp;lt;p&amp;gt;&amp;lt;asp:Label id="lbl1" runat="server" /&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;/form&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;
  &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_textbox"&gt;Example&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In the following example we declare one TextBox 
control and one Label control in an .aspx file. When you change the value in the 
TextBox and either click outside the TextBox or press the Tab key, the change 
subroutine is executed. The submit subroutine writes a text to the Label 
control:&lt;/p&gt;

&lt;table class="ex" border="1" width="100%" ID="Table3"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;script runat="server"&amp;gt;
Sub change(sender As Object, e As EventArgs)
lbl1.Text="You changed text to " &amp;amp; txt1.</description><guid>http://www.softxml.com/LearnTutorial.asp?id=37377956842&amp;f=aspnet&amp;fo=tutorials</guid><category>aspnet</category></item><item><title>ASP.NET - The Button Control</title><link>http://www.softxml.com/LearnTutorial.asp?id=14199153457&amp;f=aspnet&amp;fo=tutorials</link><description>&lt;p class="intro"&gt;The Button control is used to display a push button.&lt;/p&gt;
&lt;hr&gt;

&lt;h2&gt;The Button Control&lt;/h2&gt;
&lt;p&gt;The Button control is used to display a push button. The push button may be a 
submit button or a command button. By default, this control is a submit button.&lt;/p&gt;
&lt;p&gt;A submit button does not have a command name and it posts the page back 
to the server when it is clicked. It is possible to write an event handler to 
control the actions performed when the submit button is clicked.&lt;/p&gt;
&lt;p&gt;A command button has a command name and allows you to create multiple Button 
controls on a page. It is possible to write an event handler to control the 
actions performed when the command button is clicked.&lt;/p&gt;
&lt;p&gt;The Button control's attributes and properties are listed in our
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/aspnet_refwebcontrols.asp"&gt;web controls reference page&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The example below demonstrates a simple Button 
control:&lt;/p&gt;

&lt;table class="ex" border="1" width="100%" ID="Table1"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;html&amp;gt;
&amp;lt;body&amp;gt;

&amp;lt;form runat="server"&amp;gt;
&amp;lt;asp:Button id="b1" Text="Submit" runat="server" /&amp;gt;
&amp;lt;/form&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;
  &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;br&gt;
&lt;hr&gt;

&lt;h2&gt;Add a Script&lt;/h2&gt;

&lt;p&gt;A form is most often submitted by clicking on a 
button.&lt;/p&gt;

&lt;p&gt;In the following example we declare one TextBox 
control, one Button control, and one Label control in an .aspx file. When the 
submit button is triggered, the submit subroutine is executed. The submit 
subroutine writes a text to the Label control:&lt;/p&gt;

&lt;table class="ex" border="1" width="100%" ID="Table2"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;script runat="server"&amp;gt;
Sub submit(sender As Object, e As EventArgs)
lbl1.Text="Your name is " &amp;amp; txt1.</description><guid>http://www.softxml.com/LearnTutorial.asp?id=14199153457&amp;f=aspnet&amp;fo=tutorials</guid><category>aspnet</category></item><item><title>ASP.NET - Data Binding</title><link>http://www.softxml.com/LearnTutorial.asp?id=7350373519&amp;f=aspnet&amp;fo=tutorials</link><description>We may use data binding to fill lists with selectable items from an imported data source, like a database, an XML file, or a script.</description><guid>http://www.softxml.com/LearnTutorial.asp?id=7350373519&amp;f=aspnet&amp;fo=tutorials</guid><category>aspnet</category></item><item><title>ASP.NET - The ArrayList Object</title><link>http://www.softxml.com/LearnTutorial.asp?id=21614803744&amp;f=aspnet&amp;fo=tutorials</link><description>&lt;p class="intro"&gt;The ArrayList object is a collection of items containing a 
single data value.&lt;/p&gt;
&lt;hr&gt;

&lt;h2&gt;Examples&lt;/h2&gt;
&lt;p&gt;&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_arraylist_radio1"&gt;Example 1 - ArrayList RadioButtonList&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_arraylist_drop1"&gt;Example 2 - ArrayList DropDownList&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;

&lt;h2&gt;Create an ArrayList&lt;/h2&gt;

&lt;p&gt;The ArrayList object is a collection of items containing a single data value.&lt;/p&gt;
&lt;p&gt;Items are added to the ArrayList with the Add() method.&lt;/p&gt;
&lt;p&gt;The following code creates a new ArrayList object named 
mycountries and four items are added:&lt;/p&gt;

&lt;table class="ex" border="1" width="100%" ID="Table1"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;script runat="server"&amp;gt;
Sub Page_Load
if Not Page.IsPostBack then
  dim mycountries=New ArrayList
  mycountries.Add("Norway")
  mycountries.Add("Sweden")
  mycountries.Add("France")
  mycountries.Add("Italy")
end if
end sub
&amp;lt;/script&amp;gt;&lt;/pre&gt;
  &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;By default, an ArrayList object contains 16 entries. An ArrayList 
can be sized to its final size with the TrimToSize() method:&lt;/p&gt;

&lt;table class="ex" border="1" width="100%" ID="Table2"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;script runat="server"&amp;gt;
Sub Page_Load
if Not Page.IsPostBack then
  dim mycountries=New ArrayList
  mycountries.Add("Norway")
  mycountries.Add("Sweden")
  mycountries.Add("France")
  mycountries.Add("Italy")
  mycountries.TrimToSize()
end if
end sub
&amp;lt;/script&amp;gt;&lt;/pre&gt;
  &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;An ArrayList can also be sorted alphabetically or numerically with the Sort() 
method:&lt;/p&gt;

&lt;table class="ex" border="1" width="100%" ID="Table3"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;script runat="server"&amp;gt;
Sub Page_Load
if Not Page.IsPostBack then
  dim mycountries=New ArrayList
  mycountries.Add("Norway")
  mycountries.Add("Sweden")
  mycountries.Add("France")
  mycountries.Add("Italy")
  mycountries.TrimToSize()
  mycountries.Sort()
end if
end sub
&amp;lt;/script&amp;gt;&lt;/pre&gt;
  &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;To sort in reverse order, apply the Reverse() method 
after the Sort() method:&lt;/p&gt;

&lt;table class="ex" border="1" width="100%" ID="Table4"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;script runat="server"&amp;gt;
Sub Page_Load
if Not Page.IsPostBack then
  dim mycountries=New ArrayList
  mycountries.Add("Norway")
  mycountries.Add("Sweden")
  mycountries.Add("France")
  mycountries.Add("Italy")
  mycountries.TrimToSize()
  mycountries.Sort()
  mycountries.Reverse()
end if
end sub
&amp;lt;/script&amp;gt;&lt;/pre&gt;
  &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br&gt;
&lt;hr&gt;
&lt;h2&gt;Data Binding to an ArrayList&lt;/h2&gt;

&lt;p&gt;An ArrayList object may automatically generate the text and values to the following controls:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;asp:RadioButtonList&lt;/li&gt;
  &lt;li&gt;asp:CheckBoxList&lt;/li&gt;
  &lt;li&gt;asp:DropDownList&lt;/li&gt;
  &lt;li&gt;asp:Listbox&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To bind data to a RadioButtonList control, first create a RadioButtonList control (without 
any asp:ListItem elements) in an .aspx page:&lt;/p&gt;

&lt;table class="ex" border="1" width="100%" ID="Table5"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;html&amp;gt;
&amp;lt;body&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;form runat="server"&amp;gt;
&amp;lt;asp:RadioButtonList id="rb" runat="server" /&amp;gt;
&amp;lt;/form&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;
  &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;Then add the script that builds the list and binds the values 
in the list to the RadioButtonList control:&lt;/p&gt;

&lt;table class="ex" border="1" width="100%" ID="Table6"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;script runat="server"&amp;gt;
Sub Page_Load
if Not Page.IsPostBack then
  dim mycountries=New ArrayList
  mycountries.Add("Norway")
  mycountries.Add("Sweden")
  mycountries.Add("France")
  mycountries.Add("Italy")
  mycountries.TrimToSize()
  mycountries.Sort()
  rb.DataSource=mycountries
  rb.</description><guid>http://www.softxml.com/LearnTutorial.asp?id=21614803744&amp;f=aspnet&amp;fo=tutorials</guid><category>aspnet</category></item><item><title>ASP.NET - The Hashtable Object</title><link>http://www.softxml.com/LearnTutorial.asp?id=17822142444&amp;f=aspnet&amp;fo=tutorials</link><description>&lt;p class="intro"&gt;The Hashtable object contains items in key/value pairs.&lt;/p&gt;
&lt;hr&gt;

&lt;h2&gt;Examples&lt;/h2&gt;
&lt;p&gt;&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_hashtable_radio1"&gt;Example 1 - Hashtable RadioButtonList&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_hashtable_radio2"&gt;Example 2 - Hashtable RadiobuttonList&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_hashtable_drop1"&gt;Example 3 - Hashtable DropDownList&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;

&lt;h2&gt;Create a Hashtable&lt;/h2&gt;
&lt;p&gt;The Hashtable object contains items in key/value pairs. The keys are used as 
indexes, and very quick searches can be made for values 
by searching through their keys.&lt;/p&gt;
&lt;p&gt;Items are added to the Hashtable with the Add() method.&lt;/p&gt;
&lt;p&gt;The following code creates a Hashtable named 
mycountries and four elements are added:&lt;/p&gt;
&lt;table class="ex" border="1" width="100%" ID="Table1"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;script runat="server"&amp;gt;
Sub Page_Load
if Not Page.IsPostBack then
  dim mycountries=New Hashtable
  mycountries.Add("N","Norway")
  mycountries.Add("S","Sweden")
  mycountries.Add("F","France")
  mycountries.Add("I","Italy")
end if
end sub
&amp;lt;/script&amp;gt;&lt;/pre&gt;
  &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br&gt;
&lt;hr&gt;

&lt;h2&gt;Data Binding&lt;/h2&gt;
&lt;p&gt;A Hashtable object may automatically generate the text and values to the following controls:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;asp:RadioButtonList&lt;/li&gt;
  &lt;li&gt;asp:CheckBoxList&lt;/li&gt;
  &lt;li&gt;asp:DropDownList&lt;/li&gt;
  &lt;li&gt;asp:Listbox&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To bind data to a RadioButtonList control, first create a RadioButtonList control (without 
any asp:ListItem elements) in an .aspx page:&lt;/p&gt;
&lt;table class="ex" border="1" width="100%" ID="Table2"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;html&amp;gt;
&amp;lt;body&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;form runat="server"&amp;gt;
&amp;lt;asp:RadioButtonList id="rb" runat="server"
AutoPostBack="True" /&amp;gt;&lt;br&gt;&amp;lt;/form&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;
  &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;Then add the script that builds the list:&lt;/p&gt;
&lt;table class="ex" border="1" width="100%" ID="Table3"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;script runat="server"&amp;gt;
sub Page_Load
if Not Page.IsPostBack then
  dim mycountries=New Hashtable
  mycountries.Add("N","Norway")
  mycountries.Add("S","Sweden")
  mycountries.Add("F","France")
  mycountries.Add("I","Italy")
  rb.DataSource=mycountries&lt;br&gt;  rb.DataValueField="Key"&lt;br&gt;  rb.DataTextField="Value"&lt;br&gt;  rb.DataBind()
end if
end sub
&amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;html&amp;gt;
&amp;lt;body&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;form runat="server"&amp;gt;
&amp;lt;asp:RadioButtonList id="rb" runat="server"
AutoPostBack="True" /&amp;gt;&lt;br&gt;&amp;lt;/form&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;
  &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;Then we add a sub routine to be executed when the user clicks on an item in the RadioButtonList control. When 
a radio button is clicked, a text will appear in a label:&lt;/p&gt;
&lt;table class="ex" border="1" width="100%" ID="Table4"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;script runat="server"&amp;gt;
sub Page_Load
if Not Page.IsPostBack then
  dim mycountries=New Hashtable
  mycountries.Add("N","Norway")
  mycountries.Add("S","Sweden")
  mycountries.Add("F","France")
  mycountries.Add("I","Italy")
  rb.DataSource=mycountries
  rb.DataValueField="Key"
  rb.DataTextField="Value"
  rb.DataBind()
end if
end sub&lt;/pre&gt;
&lt;pre&gt;sub displayMessage(s as Object,e As EventArgs)
lbl1.text="Your favorite country is: " &amp;amp; rb.SelectedItem.</description><guid>http://www.softxml.com/LearnTutorial.asp?id=17822142444&amp;f=aspnet&amp;fo=tutorials</guid><category>aspnet</category></item><item><title>ASP.NET - The SortedList Object</title><link>http://www.softxml.com/LearnTutorial.asp?id=38919766740&amp;f=aspnet&amp;fo=tutorials</link><description>The SortedList object combines the features of both the ArrayList object and the Hashtable object.
Examples

Example 1 - SortedList RadioButtonList

Example 2 - SortedList RadiobuttonList

Example 3 - SortedList DropDownList
The SortedList Object

The SortedList object contains items in key/value pairs. A SortedList object automatically sort the items in alphabetic or numeric order.

Items are added to the SortedList with the Add() method. A SortedList can be sized to its final size with the TrimToSize() method.

The following code creates a SortedList named mycountries and four elements are added:

&lt;script runat="server"&gt;
sub Page_Load
if Not Page.IsPostBack then
  dim mycountries=New SortedList
  mycountries.Add("N","Norway")
  mycountries.Add("S","Sweden")
  mycountries.Add("F","France")
  mycountries.Add("I","Italy")
end if
end sub
&lt;/script&gt;


Data Binding

A SortedList object may automatically generate the text and values to the following controls:

    * asp:RadioButtonList
    * asp:CheckBoxList
    * asp:DropDownList
    * asp:Listbox

To bind data to a RadioButtonList control, first create a RadioButtonList control (without any asp:ListItem elements) in an .aspx page:

&lt;html&gt;
&lt;body&gt;

&lt;form runat="server"&gt;
&lt;asp:RadioButtonList id="rb" runat="server"
AutoPostBack="True" /&gt;
&lt;/form&gt;

&lt;/body&gt;
&lt;/html&gt;

Then add the script that builds the list:

&lt;script runat="server"&gt;
sub Page_Load
if Not Page.IsPostBack then
  dim mycountries=New SortedList
  mycountries.Add("N","Norway")
  mycountries.Add("S","Sweden")
  mycountries.Add("F","France")
  mycountries.Add("I","Italy")
  rb.DataSource=mycountries
  rb.DataValueField="Key"
  rb.DataTextField="Value"
  rb.DataBind()
end if
end sub
&lt;/script&gt;

&lt;html&gt;
&lt;body&gt;

&lt;form runat="server"&gt;
&lt;asp:RadioButtonList id="rb" runat="server"
AutoPostBack="True" /&gt;
&lt;/form&gt;

&lt;/body&gt;
&lt;/html&gt;

Then we add a sub routine to be executed when the user clicks on an item in the RadioButtonList control. When a radio button is clicked, a text will appear in a label:

&lt;script runat="server"&gt;
sub Page_Load
if Not Page.IsPostBack then
  dim mycountries=New SortedList
  mycountries.Add("N","Norway")
  mycountries.Add("S","Sweden")
  mycountries.Add("F","France")
  mycountries.Add("I","Italy")
  rb.DataSource=mycountries
  rb.DataValueField="Key"
  rb.DataTextField="Value"
  rb.</description><guid>http://www.softxml.com/LearnTutorial.asp?id=38919766740&amp;f=aspnet&amp;fo=tutorials</guid><category>aspnet</category></item><item><title>ASP .NET - XML Files</title><link>http://www.softxml.com/LearnTutorial.asp?id=14611814739&amp;f=aspnet&amp;fo=tutorials</link><description>&lt;p class="intro"&gt;We can bind an XML file to a list control.&lt;/p&gt;
&lt;hr&gt;

&lt;h2&gt;Examples&lt;/h2&gt;
&lt;p&gt;&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_xml_radio1"&gt;Example 1 - 
XML RadiobuttonList&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;

&lt;h2&gt;An XML File&lt;/h2&gt;

&lt;p&gt;Here is an XML file named "countries.xml":&lt;/p&gt;
&lt;table class="ex" border="1" width="100%" ID="Table1"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;?xml version="1.0" encoding="ISO-8859-1"?&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;countries&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;country&amp;gt;
&amp;lt;text&amp;gt;Norway&amp;lt;/text&amp;gt;
&amp;lt;value&amp;gt;N&amp;lt;/value&amp;gt;
&amp;lt;/country&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;country&amp;gt;
&amp;lt;text&amp;gt;Sweden&amp;lt;/text&amp;gt;
&amp;lt;value&amp;gt;S&amp;lt;/value&amp;gt;
&amp;lt;/country&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;country&amp;gt;
&amp;lt;text&amp;gt;France&amp;lt;/text&amp;gt;
&amp;lt;value&amp;gt;F&amp;lt;/value&amp;gt;
&amp;lt;/country&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;country&amp;gt;
&amp;lt;text&amp;gt;Italy&amp;lt;/text&amp;gt;
&amp;lt;value&amp;gt;I&amp;lt;/value&amp;gt;
&amp;lt;/country&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;/countries&amp;gt;&lt;/pre&gt;
  &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;Take a look at the XML file: &lt;a target="_blank" href="http://www.w3schools.com/aspnet/countries.xml"&gt;countries.xml&lt;/a&gt;&lt;/p&gt;

&lt;hr&gt;

&lt;h2&gt;Bind a DataSet to a List Control&lt;/h2&gt;

&lt;p&gt;First, import the "System.Data" 
namespace. We need this namespace to work with DataSet objects. Include the 
following directive at the top of an .aspx page:&lt;/p&gt;

&lt;table class="ex" border="1" width="100%" ID="Table2"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;%@ Import Namespace="System.Data" %&amp;gt;&lt;/pre&gt;
  &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;Next, create a DataSet for the XML file and load the XML file into the DataSet when the page is first loaded:&lt;/p&gt;
&lt;table class="ex" border="1" width="100%" ID="Table3"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;script runat="server"&amp;gt;
sub Page_Load
if Not Page.IsPostBack then
  dim mycountries=New DataSet
  mycountries.ReadXml(MapPath("countries.xml"))
end if
end sub&lt;/pre&gt;
  &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;To bind the DataSet to a RadioButtonList control, first create a RadioButtonList control (without 
any asp:ListItem elements) in an .aspx page:&lt;/p&gt;

&lt;table class="ex" border="1" width="100%" ID="Table4"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;html&amp;gt;
&amp;lt;body&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;form runat="server"&amp;gt;
&amp;lt;asp:RadioButtonList id="rb" runat="server"
AutoPostBack="True" /&amp;gt;&lt;br&gt;&amp;lt;/form&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;
  &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;Then add the script that builds the XML DataSet:&lt;/p&gt;

&lt;table class="ex" border="1" width="100%" ID="Table5"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;%@ Import Namespace="System.Data" %&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;script runat="server"&amp;gt;
sub Page_Load
if Not Page.IsPostBack then
  dim mycountries=New DataSet
  mycountries.ReadXml(MapPath("countries.xml"))
  rb.DataSource=mycountries
  rb.DataValueField="value"
  rb.DataTextField="text"
  rb.DataBind()
end if
end sub
&amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;html&amp;gt;
&amp;lt;body&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;form runat="server"&amp;gt;
&amp;lt;asp:RadioButtonList id="rb" runat="server"
AutoPostBack="True" onSelectedIndexChanged="displayMessage" /&amp;gt;
&amp;lt;/form&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;
  &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;Then we add a sub routine to be executed when the user clicks on an item in the RadioButtonList control. When 
a radio button is clicked, a text will appear in a label:&lt;/p&gt;

&lt;table class="ex" border="1" width="100%" ID="Table6"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;%@ Import Namespace="System.Data" %&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;script runat="server"&amp;gt;
sub Page_Load
if Not Page.IsPostBack then
  dim mycountries=New DataSet
  mycountries.ReadXml(MapPath("countries.xml"))
  rb.DataSource=mycountries
  rb.DataValueField="value"
  rb.DataTextField="text"
  rb.DataBind()
end if
end sub&lt;/pre&gt;
&lt;pre&gt;sub displayMessage(s as Object,e As EventArgs)
lbl1.text="Your favorite country is: " &amp;amp; rb.SelectedItem.</description><guid>http://www.softxml.com/LearnTutorial.asp?id=14611814739&amp;f=aspnet&amp;fo=tutorials</guid><category>aspnet</category></item><item><title>ASP.NET - The Repeater Control</title><link>http://www.softxml.com/LearnTutorial.asp?id=32018673909&amp;f=aspnet&amp;fo=tutorials</link><description>&lt;p class="intro"&gt;The Repeater control is used to display a repeated list of items that are bound to 
the control.&lt;/p&gt;
&lt;hr&gt;

&lt;h2&gt;Examples&lt;/h2&gt;
&lt;p&gt;&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_repeater1"&gt;Repeater control&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_repeater2"&gt;Repeater control with &amp;lt;AlternatingItemTemplate&amp;gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_repeater3"&gt;Repeater control with &amp;lt;SeparatorTemplate&amp;gt;&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;

&lt;h2&gt;Bind a DataSet to a Repeater Control&lt;/h2&gt;

&lt;p&gt;The Repeater control is used to display a repeated list of items that are bound to 
the control. The Repeater control may be bound to a database 
table, an XML file, or another list of items. Here we will show how to bind an 
XML file to a Repeater control.&lt;/p&gt;

&lt;p&gt;We will use the following XML file in our examples ("cdcatalog.xml"):&lt;/p&gt;
&lt;table class="ex" border="1" width="100%" ID="Table1"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;?xml version="1.0" encoding="ISO-8859-1"?&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;catalog&amp;gt;
&amp;lt;cd&amp;gt;
&amp;lt;title&amp;gt;Empire Burlesque&amp;lt;/title&amp;gt;
&amp;lt;artist&amp;gt;Bob Dylan&amp;lt;/artist&amp;gt;
&amp;lt;country&amp;gt;USA&amp;lt;/country&amp;gt;
&amp;lt;company&amp;gt;Columbia&amp;lt;/company&amp;gt;
&amp;lt;price&amp;gt;10.90&amp;lt;/price&amp;gt;
&amp;lt;year&amp;gt;1985&amp;lt;/year&amp;gt;
&amp;lt;/cd&amp;gt;
&amp;lt;cd&amp;gt;
&amp;lt;title&amp;gt;Hide your heart&amp;lt;/title&amp;gt;
&amp;lt;artist&amp;gt;Bonnie Tyler&amp;lt;/artist&amp;gt;
&amp;lt;country&amp;gt;UK&amp;lt;/country&amp;gt;
&amp;lt;company&amp;gt;CBS Records&amp;lt;/company&amp;gt;
&amp;lt;price&amp;gt;9.90&amp;lt;/price&amp;gt;
&amp;lt;year&amp;gt;1988&amp;lt;/year&amp;gt;
&amp;lt;/cd&amp;gt;
&amp;lt;cd&amp;gt;
&amp;lt;title&amp;gt;Greatest Hits&amp;lt;/title&amp;gt;
&amp;lt;artist&amp;gt;Dolly Parton&amp;lt;/artist&amp;gt;
&amp;lt;country&amp;gt;USA&amp;lt;/country&amp;gt;
&amp;lt;company&amp;gt;RCA&amp;lt;/company&amp;gt;
&amp;lt;price&amp;gt;9.90&amp;lt;/price&amp;gt;
&amp;lt;year&amp;gt;1982&amp;lt;/year&amp;gt;
&amp;lt;/cd&amp;gt;
&amp;lt;cd&amp;gt;
&amp;lt;title&amp;gt;Still got the blues&amp;lt;/title&amp;gt;
&amp;lt;artist&amp;gt;Gary Moore&amp;lt;/artist&amp;gt;
&amp;lt;country&amp;gt;UK&amp;lt;/country&amp;gt;
&amp;lt;company&amp;gt;Virgin records&amp;lt;/company&amp;gt;
&amp;lt;price&amp;gt;10.20&amp;lt;/price&amp;gt;
&amp;lt;year&amp;gt;1990&amp;lt;/year&amp;gt;
&amp;lt;/cd&amp;gt;
&amp;lt;cd&amp;gt;
&amp;lt;title&amp;gt;Eros&amp;lt;/title&amp;gt;
&amp;lt;artist&amp;gt;Eros Ramazzotti&amp;lt;/artist&amp;gt;
&amp;lt;country&amp;gt;EU&amp;lt;/country&amp;gt;
&amp;lt;company&amp;gt;BMG&amp;lt;/company&amp;gt;
&amp;lt;price&amp;gt;9.90&amp;lt;/price&amp;gt;
&amp;lt;year&amp;gt;1997&amp;lt;/year&amp;gt;
&amp;lt;/cd&amp;gt;
&amp;lt;/catalog&amp;gt;&lt;/pre&gt;
  &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;Take a look at the XML file: &lt;a target="_blank" href="http://www.w3schools.com/aspnet/cdcatalog.xml"&gt;cdcatalog.xml&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First, import the "System.Data" 
namespace. We need this namespace to work with DataSet objects. Include the 
following directive at the top of an .aspx page:&lt;/p&gt;

&lt;table class="ex" border="1" width="100%" ID="Table2"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;%@ Import Namespace="System.Data" %&amp;gt;&lt;/pre&gt;
  &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;Next, create a DataSet for the XML file and load the XML file into the DataSet when the page is first loaded:&lt;/p&gt;
&lt;table class="ex" border="1" width="100%" ID="Table3"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;script runat="server"&amp;gt;
sub Page_Load
if Not Page.IsPostBack then
  dim mycdcatalog=New DataSet
  mycdcatalog.ReadXml(MapPath("cdcatalog.xml"))
end if
end sub&lt;/pre&gt;
  &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;Then we create a Repeater control in an .aspx page. The contents of the &amp;lt;HeaderTemplate&amp;gt; 
element are rendered first and only once within the output, then the contents of the &amp;lt;ItemTemplate&amp;gt; 
element are repeated for each 
"record" in the DataSet, and last, the contents of the &amp;lt;FooterTemplate&amp;gt; 
element are rendered once within the output:&lt;/p&gt;

&lt;table class="ex" border="1" width="100%" ID="Table4"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;html&amp;gt;
&amp;lt;body&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;form runat="server"&amp;gt;
&amp;lt;asp:Repeater id="cdcatalog" runat="server"&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;HeaderTemplate&amp;gt;
...
&amp;lt;/HeaderTemplate&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;ItemTemplate&amp;gt;
...
&amp;lt;/ItemTemplate&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;FooterTemplate&amp;gt;
...
&amp;lt;/FooterTemplate&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;/asp:Repeater&amp;gt;
&amp;lt;/form&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;
  &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;Then we add the script that creates the DataSet and binds the mycdcatalog 
DataSet to the Repeater control. We also fill the Repeater control with HTML 
tags and bind the data items to the cells in the&amp;lt;ItemTemplate&amp;gt; section with the 
&amp;lt;%#Container.DataItem("fieldname")%&amp;gt; method:&lt;/p&gt;

&lt;table class="ex" border="1" width="100%" ID="Table5"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;%@ Import Namespace="System.Data" %&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;script runat="server"&amp;gt;
sub Page_Load
if Not Page.IsPostBack then
  dim mycdcatalog=New DataSet
  mycdcatalog.ReadXml(MapPath("cdcatalog.xml"))
  cdcatalog.DataSource=mycdcatalog
  cdcatalog.DataBind()
end if
end sub
&amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;html&amp;gt;
&amp;lt;body&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;form runat="server"&amp;gt;
&amp;lt;asp:Repeater id="cdcatalog" runat="server"&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;HeaderTemplate&amp;gt;
&amp;lt;table border="1" width="100%"&amp;gt;
&amp;lt;tr&amp;gt;
&amp;lt;th&amp;gt;Title&amp;lt;/th&amp;gt;
&amp;lt;th&amp;gt;Artist&amp;lt;/th&amp;gt;
&amp;lt;th&amp;gt;Country&amp;lt;/th&amp;gt;
&amp;lt;th&amp;gt;Company&amp;lt;/th&amp;gt;
&amp;lt;th&amp;gt;Price&amp;lt;/th&amp;gt;
&amp;lt;th&amp;gt;Year&amp;lt;/th&amp;gt;
&amp;lt;/tr&amp;gt;
&amp;lt;/HeaderTemplate&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;ItemTemplate&amp;gt;
&amp;lt;tr&amp;gt;
&amp;lt;td&amp;gt;&amp;lt;%#Container.DataItem("title")%&amp;gt;&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;&amp;lt;%#Container.DataItem("artist")%&amp;gt;&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;&amp;lt;%#Container.DataItem("country")%&amp;gt;&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;&amp;lt;%#Container.DataItem("company")%&amp;gt;&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;&amp;lt;%#Container.DataItem("price")%&amp;gt;&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;&amp;lt;%#Container.DataItem("year")%&amp;gt;&amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&amp;lt;/ItemTemplate&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;FooterTemplate&amp;gt;
&amp;lt;/table&amp;gt;
&amp;lt;/FooterTemplate&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;/asp:Repeater&amp;gt;
&amp;lt;/form&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;
  &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br&gt;
&lt;hr&gt;

&lt;h2&gt;Using the &amp;lt;AlternatingItemTemplate&amp;gt;&lt;/h2&gt;

&lt;p&gt;You can add an &amp;lt;AlternatingItemTemplate&amp;gt; element after the &amp;lt;ItemTemplate&amp;gt; 
element to describe the appearance of alternating rows of output. In the 
following example each other row in the table will be displayed in a light grey 
color:&lt;/p&gt;

&lt;table class="ex" border="1" width="100%" ID="Table6"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;%@ Import Namespace="System.Data" %&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;script runat="server"&amp;gt;
sub Page_Load
if Not Page.IsPostBack then
  dim mycdcatalog=New DataSet
  mycdcatalog.ReadXml(MapPath("cdcatalog.xml"))
  cdcatalog.DataSource=mycdcatalog
  cdcatalog.DataBind()
end if
end sub
&amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;html&amp;gt;
&amp;lt;body&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;form runat="server"&amp;gt;
&amp;lt;asp:Repeater id="cdcatalog" runat="server"&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;HeaderTemplate&amp;gt;
&amp;lt;table border="1" width="100%"&amp;gt;
&amp;lt;tr&amp;gt;
&amp;lt;th&amp;gt;Title&amp;lt;/th&amp;gt;
&amp;lt;th&amp;gt;Artist&amp;lt;/th&amp;gt;
&amp;lt;th&amp;gt;Country&amp;lt;/th&amp;gt;
&amp;lt;th&amp;gt;Company&amp;lt;/th&amp;gt;
&amp;lt;th&amp;gt;Price&amp;lt;/th&amp;gt;
&amp;lt;th&amp;gt;Year&amp;lt;/th&amp;gt;
&amp;lt;/tr&amp;gt;
&amp;lt;/HeaderTemplate&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;ItemTemplate&amp;gt;
&amp;lt;tr&amp;gt;
&amp;lt;td&amp;gt;&amp;lt;%#Container.DataItem("title")%&amp;gt;&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;&amp;lt;%#Container.DataItem("artist")%&amp;gt;&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;&amp;lt;%#Container.DataItem("country")%&amp;gt;&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;&amp;lt;%#Container.DataItem("company")%&amp;gt;&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;&amp;lt;%#Container.DataItem("price")%&amp;gt;&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;&amp;lt;%#Container.DataItem("year")%&amp;gt;&amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&amp;lt;/ItemTemplate&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;AlternatingItemTemplate&amp;gt;
&amp;lt;tr bgcolor="#e8e8e8"&amp;gt;&lt;br&gt;&amp;lt;td&amp;gt;&amp;lt;%#Container.DataItem("title")%&amp;gt;&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;&amp;lt;%#Container.DataItem("artist")%&amp;gt;&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;&amp;lt;%#Container.DataItem("country")%&amp;gt;&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;&amp;lt;%#Container.DataItem("company")%&amp;gt;&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;&amp;lt;%#Container.DataItem("price")%&amp;gt;&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;&amp;lt;%#Container.DataItem("year")%&amp;gt;&amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&amp;lt;/AlternatingItemTemplate&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;FooterTemplate&amp;gt;
&amp;lt;/table&amp;gt;
&amp;lt;/FooterTemplate&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;/asp:Repeater&amp;gt;
&amp;lt;/form&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;
  &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br&gt;
&lt;hr&gt;

&lt;h2&gt;Using the &amp;lt;SeparatorTemplate&amp;gt;&lt;/h2&gt;
&lt;p&gt;The &amp;lt;SeparatorTemplate&amp;gt; element can be used to describe a separator 
between each record. The following example inserts a horizontal 
line between each table row:&lt;/p&gt;

&lt;table class="ex" border="1" width="100%" ID="Table7"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;%@ Import Namespace="System.Data" %&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;script runat="server"&amp;gt;
sub Page_Load
if Not Page.IsPostBack then
  dim mycdcatalog=New DataSet
  mycdcatalog.ReadXml(MapPath("cdcatalog.xml"))
  cdcatalog.DataSource=mycdcatalog
  cdcatalog.DataBind()
end if
end sub
&amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;html&amp;gt;
&amp;lt;body&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;form runat="server"&amp;gt;
&amp;lt;asp:Repeater id="cdcatalog" runat="server"&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;HeaderTemplate&amp;gt;
&amp;lt;table border="0" width="100%"&amp;gt;
&amp;lt;tr&amp;gt;
&amp;lt;th&amp;gt;Title&amp;lt;/th&amp;gt;
&amp;lt;th&amp;gt;Artist&amp;lt;/th&amp;gt;
&amp;lt;th&amp;gt;Country&amp;lt;/th&amp;gt;
&amp;lt;th&amp;gt;Company&amp;lt;/th&amp;gt;
&amp;lt;th&amp;gt;Price&amp;lt;/th&amp;gt;
&amp;lt;th&amp;gt;Year&amp;lt;/th&amp;gt;
&amp;lt;/tr&amp;gt;
&amp;lt;/HeaderTemplate&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;ItemTemplate&amp;gt;
&amp;lt;tr&amp;gt;
&amp;lt;td&amp;gt;&amp;lt;%#Container.DataItem("title")%&amp;gt;&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;&amp;lt;%#Container.DataItem("artist")%&amp;gt;&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;&amp;lt;%#Container.DataItem("country")%&amp;gt;&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;&amp;lt;%#Container.DataItem("company")%&amp;gt;&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;&amp;lt;%#Container.DataItem("price")%&amp;gt;&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;&amp;lt;%#Container.</description><guid>http://www.softxml.com/LearnTutorial.asp?id=32018673909&amp;f=aspnet&amp;fo=tutorials</guid><category>aspnet</category></item><item><title>ASP.NET - The DataList Control</title><link>http://www.softxml.com/LearnTutorial.asp?id=16959940042&amp;f=aspnet&amp;fo=tutorials</link><description>&lt;p class="intro"&gt;The DataList control is, like the Repeater control, used to display a repeated list of items that are bound to 
the control. However, the DataList control adds a table around the data items by 
default.&lt;/p&gt;
&lt;hr&gt;

&lt;h2&gt;Examples&lt;/h2&gt;
&lt;p&gt;&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_datalist1"&gt;DataList control&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_datalist2"&gt;DataList control with styles&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_datalist3"&gt;DataList control with &amp;lt;AlternatingItemTemplate&amp;gt;&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;

&lt;h2&gt;Bind a DataSet to a DataList Control&lt;/h2&gt;

&lt;p&gt;The DataList control is, like the Repeater control, used to display a repeated list of items that are bound to 
the control. However, the DataList control adds a table around the data items by 
default. The DataList control may be bound to a database 
table, an XML file, or another list of items. Here we will show how to bind an 
XML file to a DataList control.&lt;/p&gt;

&lt;p&gt;We will use the following XML file in our examples ("cdcatalog.xml"):&lt;/p&gt;
&lt;table class="ex" border="1" width="100%" ID="Table1"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;?xml version="1.0" encoding="ISO-8859-1"?&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;catalog&amp;gt;
&amp;lt;cd&amp;gt;
&amp;lt;title&amp;gt;Empire Burlesque&amp;lt;/title&amp;gt;
&amp;lt;artist&amp;gt;Bob Dylan&amp;lt;/artist&amp;gt;
&amp;lt;country&amp;gt;USA&amp;lt;/country&amp;gt;
&amp;lt;company&amp;gt;Columbia&amp;lt;/company&amp;gt;
&amp;lt;price&amp;gt;10.90&amp;lt;/price&amp;gt;
&amp;lt;year&amp;gt;1985&amp;lt;/year&amp;gt;
&amp;lt;/cd&amp;gt;
&amp;lt;cd&amp;gt;
&amp;lt;title&amp;gt;Hide your heart&amp;lt;/title&amp;gt;
&amp;lt;artist&amp;gt;Bonnie Tyler&amp;lt;/artist&amp;gt;
&amp;lt;country&amp;gt;UK&amp;lt;/country&amp;gt;
&amp;lt;company&amp;gt;CBS Records&amp;lt;/company&amp;gt;
&amp;lt;price&amp;gt;9.90&amp;lt;/price&amp;gt;
&amp;lt;year&amp;gt;1988&amp;lt;/year&amp;gt;
&amp;lt;/cd&amp;gt;
&amp;lt;cd&amp;gt;
&amp;lt;title&amp;gt;Greatest Hits&amp;lt;/title&amp;gt;
&amp;lt;artist&amp;gt;Dolly Parton&amp;lt;/artist&amp;gt;
&amp;lt;country&amp;gt;USA&amp;lt;/country&amp;gt;
&amp;lt;company&amp;gt;RCA&amp;lt;/company&amp;gt;
&amp;lt;price&amp;gt;9.90&amp;lt;/price&amp;gt;
&amp;lt;year&amp;gt;1982&amp;lt;/year&amp;gt;
&amp;lt;/cd&amp;gt;
&amp;lt;cd&amp;gt;
&amp;lt;title&amp;gt;Still got the blues&amp;lt;/title&amp;gt;
&amp;lt;artist&amp;gt;Gary Moore&amp;lt;/artist&amp;gt;
&amp;lt;country&amp;gt;UK&amp;lt;/country&amp;gt;
&amp;lt;company&amp;gt;Virgin records&amp;lt;/company&amp;gt;
&amp;lt;price&amp;gt;10.20&amp;lt;/price&amp;gt;
&amp;lt;year&amp;gt;1990&amp;lt;/year&amp;gt;
&amp;lt;/cd&amp;gt;
&amp;lt;cd&amp;gt;
&amp;lt;title&amp;gt;Eros&amp;lt;/title&amp;gt;
&amp;lt;artist&amp;gt;Eros Ramazzotti&amp;lt;/artist&amp;gt;
&amp;lt;country&amp;gt;EU&amp;lt;/country&amp;gt;
&amp;lt;company&amp;gt;BMG&amp;lt;/company&amp;gt;
&amp;lt;price&amp;gt;9.90&amp;lt;/price&amp;gt;
&amp;lt;year&amp;gt;1997&amp;lt;/year&amp;gt;
&amp;lt;/cd&amp;gt;
&amp;lt;/catalog&amp;gt;&lt;/pre&gt;
  &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;Take a look at the XML file: &lt;a target="_blank" href="http://www.w3schools.com/aspnet/cdcatalog.xml"&gt;cdcatalog.xml&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First, import the "System.Data" 
namespace. We need this namespace to work with DataSet objects. Include the 
following directive at the top of an .aspx page:&lt;/p&gt;

&lt;table class="ex" border="1" width="100%" ID="Table2"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;%@ Import Namespace="System.Data" %&amp;gt;&lt;/pre&gt;
  &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;Next, create a DataSet for the XML file and load the XML file into the DataSet when the page is first loaded:&lt;/p&gt;
&lt;table class="ex" border="1" width="100%" ID="Table3"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;script runat="server"&amp;gt;
sub Page_Load
if Not Page.IsPostBack then
  dim mycdcatalog=New DataSet
  mycdcatalog.ReadXml(MapPath("cdcatalog.xml"))
end if
end sub&lt;/pre&gt;
  &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;Then we create a DataList in an .aspx page. The contents of the &amp;lt;HeaderTemplate&amp;gt; 
element are rendered first and only once within the output, then the contents of the &amp;lt;ItemTemplate&amp;gt; 
element are repeated for each 
"record" in the DataSet, and last, the contents of the &amp;lt;FooterTemplate&amp;gt; 
element are rendered once within the output:&lt;/p&gt;

&lt;table class="ex" border="1" width="100%" ID="Table4"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;html&amp;gt;
&amp;lt;body&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;form runat="server"&amp;gt;
&amp;lt;asp:DataList id="cdcatalog" runat="server"&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;HeaderTemplate&amp;gt;
...
&amp;lt;/HeaderTemplate&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;ItemTemplate&amp;gt;
...
&amp;lt;/ItemTemplate&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;FooterTemplate&amp;gt;
...
&amp;lt;/FooterTemplate&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;/asp:DataList&amp;gt;
&amp;lt;/form&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;
  &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt;Then we add the script that creates the DataSet and binds the mycdcatalog 
DataSet to the DataList control. We also fill the DataList control with a &amp;lt;HeaderTemplate&amp;gt; 
that contains the header of the table, an &amp;lt;ItemTemplate&amp;gt; that contains the 
data items to display, and a &amp;lt;FooterTemplate&amp;gt; that contains a text. Note that 
the gridlines attribute of the DataList is set to "both" to display table 
borders:&lt;/p&gt;

&lt;table class="ex" border="1" width="100%" ID="Table5"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;%@ Import Namespace="System.Data" %&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;script runat="server"&amp;gt;
sub Page_Load
if Not Page.IsPostBack then
  dim mycdcatalog=New DataSet
  mycdcatalog.ReadXml(MapPath("cdcatalog.xml"))
  cdcatalog.DataSource=mycdcatalog
  cdcatalog.DataBind()
end if
end sub
&amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;html&amp;gt;
&amp;lt;body&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;form runat="server"&amp;gt;
&amp;lt;asp:DataList id="cdcatalog"
gridlines="both" runat="server"&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;HeaderTemplate&amp;gt;
My CD Catalog
&amp;lt;/HeaderTemplate&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;ItemTemplate&amp;gt;
"&amp;lt;%#Container.DataItem("title")%&amp;gt;" of
&amp;lt;%#Container.DataItem("artist")%&amp;gt; -
$&amp;lt;%#Container.DataItem("price")%&amp;gt;
&amp;lt;/ItemTemplate&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;FooterTemplate&amp;gt;
Copyright Hege Refsnes
&amp;lt;/FooterTemplate&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;/asp:DataList&amp;gt;
&amp;lt;/form&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;
  &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br&gt;
&lt;hr&gt;

&lt;h2&gt;Using Styles&lt;/h2&gt;

&lt;p&gt;You can also add styles to the DataList control to make the output more fancy:&lt;/p&gt;

&lt;table class="ex" border="1" width="100%" ID="Table6"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;%@ Import Namespace="System.Data" %&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;script runat="server"&amp;gt;
sub Page_Load
if Not Page.IsPostBack then
  dim mycdcatalog=New DataSet
  mycdcatalog.ReadXml(MapPath("cdcatalog.xml"))
  cdcatalog.DataSource=mycdcatalog
  cdcatalog.DataBind()
end if
end sub
&amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;html&amp;gt;
&amp;lt;body&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;form runat="server"&amp;gt;
&amp;lt;asp:DataList id="cdcatalog"
runat="server"
cellpadding="2"
cellspacing="2"
borderstyle="inset"
backcolor="#e8e8e8"
width="100%"
headerstyle-font-name="Verdana"
headerstyle-font-size="12pt"
headerstyle-horizontalalign="center"
headerstyle-font-bold="true"
itemstyle-backcolor="#778899"
itemstyle-forecolor="#ffffff"
footerstyle-font-size="9pt"
footerstyle-font-italic="true"&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;HeaderTemplate&amp;gt;
My CD Catalog
&amp;lt;/HeaderTemplate&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;ItemTemplate&amp;gt;
"&amp;lt;%#Container.DataItem("title")%&amp;gt;" of
&amp;lt;%#Container.DataItem("artist")%&amp;gt; -
$&amp;lt;%#Container.DataItem("price")%&amp;gt;
&amp;lt;/ItemTemplate&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;FooterTemplate&amp;gt;
Copyright Hege Refsnes
&amp;lt;/FooterTemplate&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;/asp:DataList&amp;gt;
&amp;lt;/form&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;
  &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br&gt;

&lt;hr&gt;

&lt;h2&gt;Using the &amp;lt;AlternatingItemTemplate&amp;gt;&lt;/h2&gt;

&lt;p&gt;You can add an &amp;lt;AlternatingItemTemplate&amp;gt; element after the &amp;lt;ItemTemplate&amp;gt; 
element to describe the appearance of alternating rows of output. You may style 
the data in the &amp;lt;AlternatingItemTemplate&amp;gt; section within the DataList control:&lt;/p&gt;

&lt;table class="ex" border="1" width="100%" ID="Table7"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;%@ Import Namespace="System.Data" %&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;script runat="server"&amp;gt;
sub Page_Load
if Not Page.IsPostBack then
dim mycdcatalog=New DataSet
mycdcatalog.ReadXml(MapPath("cdcatalog.xml"))
cdcatalog.DataSource=mycdcatalog
cdcatalog.DataBind()
end if
end sub
&amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;html&amp;gt;
&amp;lt;body&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;form runat="server"&amp;gt;
&amp;lt;asp:DataList id="cdcatalog"
runat="server"
cellpadding="2"
cellspacing="2"
borderstyle="inset"
backcolor="#e8e8e8"
width="100%"
headerstyle-font-name="Verdana"
headerstyle-font-size="12pt"
headerstyle-horizontalalign="center"
headerstyle-font-bold="True"
itemstyle-backcolor="#778899"
itemstyle-forecolor="#ffffff"
alternatingitemstyle-backcolor="#e8e8e8"
alternatingitemstyle-forecolor="#000000"
footerstyle-font-size="9pt"
footerstyle-font-italic="True"&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;HeaderTemplate&amp;gt;
My CD Catalog
&amp;lt;/HeaderTemplate&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;ItemTemplate&amp;gt;
"&amp;lt;%#Container.DataItem("title")%&amp;gt;" of
&amp;lt;%#Container.DataItem("artist")%&amp;gt; -
$&amp;lt;%#Container.</description><guid>http://www.softxml.com/LearnTutorial.asp?id=16959940042&amp;f=aspnet&amp;fo=tutorials</guid><category>aspnet</category></item><item><title>ASP.NET - Database Connection</title><link>http://www.softxml.com/LearnTutorial.asp?id=575507144&amp;f=aspnet&amp;fo=tutorials</link><description>&lt;p class="intro"&gt;ADO.NET is also a part of the .NET Framework. ADO.NET is used to handle 
data access. 
With ADO.NET you can work 
with databases.&lt;/p&gt;
&lt;hr&gt;

&lt;h2&gt;Examples&lt;/h2&gt;
&lt;p&gt;&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_dbconn_repeater"&gt;Database connection - Bind to a Repeater control&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_dbconn_datalist"&gt;Database connection - Bind to a DataList control&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;

&lt;h2&gt;What is ADO.NET?&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;ADO.NET is a part of the .NET Framework&lt;/li&gt;
  &lt;li&gt;ADO.NET consists of a set of classes used to handle data access&lt;/li&gt;
  &lt;li&gt;ADO.NET is entirely based on 
XML&lt;/li&gt;
  &lt;li&gt;ADO.NET has, unlike ADO, no Recordset object&lt;/li&gt;
&lt;/ul&gt;

&lt;hr&gt;

&lt;h2&gt;Create a Database Connection&lt;/h2&gt;

&lt;p&gt;We are going to use the Northwind database in our examples.&lt;/p&gt;

&lt;p&gt;First, import the "System.Data.OleDb" 
namespace. We need this namespace to work with Microsoft Access and other OLE DB 
database providers. We will create the connection to the database in the Page_Load subroutine. 
We create a dbconn variable as a new OleDbConnection class with a connection 
string which identifies the OLE DB provider and 
the location of the database. Then we open the database connection:&lt;/p&gt;

&lt;table class="ex" border="1" width="100%" ID="Table1"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;%@ Import Namespace="System.Data.OleDb" %&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;script runat="server"&amp;gt;
sub Page_Load
dim dbconn
dbconn=New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;
data source=" &amp;amp; server.mappath("northwind.mdb"))
dbconn.Open()
end sub
&amp;lt;/script&amp;gt;&lt;/pre&gt;
  &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;

&lt;p&gt; &lt;b&gt;Note:&lt;/b&gt; The connection string must be a continuous string without a 
line break!&lt;/p&gt;

&lt;hr&gt;

&lt;h2&gt;Create a Database Command&lt;/h2&gt;

&lt;p&gt;To specify the records to retrieve from the database, we will create a dbcomm 
variable as a new OleDbCommand class. The OleDbCommand class is for issuing SQL 
queries against database tables:&lt;/p&gt;

&lt;table class="ex" border="1" width="100%" ID="Table2"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;%@ Import Namespace="System.Data.OleDb" %&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;script runat="server"&amp;gt;
sub Page_Load
dim dbconn,sql,dbcomm
dbconn=New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;
data source=" &amp;amp; server.mappath("northwind.mdb"))
dbconn.Open()
sql="SELECT * FROM customers"
dbcomm=New OleDbCommand(sql,dbconn)
end sub
&amp;lt;/script&amp;gt;&lt;/pre&gt;
  &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br&gt;
&lt;hr&gt;

&lt;h2&gt;Create a DataReader&lt;/h2&gt;

&lt;p&gt;The OleDbDataReader class is used to read a stream of records from a data 
source. A DataReader is created by calling the ExecuteReader method of the 
OleDbCommand object:&lt;/p&gt;

&lt;table class="ex" border="1" width="100%" ID="Table3"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;%@ Import Namespace="System.Data.OleDb" %&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;script runat="server"&amp;gt;
sub Page_Load
dim dbconn,sql,dbcomm,dbread
dbconn=New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;
data source=" &amp;amp; server.mappath("northwind.mdb"))
dbconn.Open()
sql="SELECT * FROM customers"
dbcomm=New OleDbCommand(sql,dbconn)
dbread=dbcomm.ExecuteReader()
end sub
&amp;lt;/script&amp;gt;&lt;/pre&gt;
  &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br&gt;
&lt;hr&gt;

&lt;h2&gt;Bind to a Repeater Control&lt;/h2&gt;

&lt;p&gt;Then we bind the DataReader to 
a Repeater control:&lt;/p&gt;

&lt;table class="ex" border="1" width="100%" ID="Table4"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;%@ Import Namespace="System.Data.OleDb" %&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;script runat="server"&amp;gt;
sub Page_Load
dim dbconn,sql,dbcomm,dbread
dbconn=New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;
data source=" &amp;amp; server.mappath("northwind.mdb"))
dbconn.Open()
sql="SELECT * FROM customers"
dbcomm=New OleDbCommand(sql,dbconn)
dbread=dbcomm.ExecuteReader()
customers.DataSource=dbread
customers.DataBind()
dbread.Close()
dbconn.Close()
end sub
&amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;html&amp;gt;
&amp;lt;body&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;form runat="server"&amp;gt;
&amp;lt;asp:Repeater id="customers" runat="server"&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;HeaderTemplate&amp;gt;
&amp;lt;table border="1" width="100%"&amp;gt;
&amp;lt;tr&amp;gt;
&amp;lt;th&amp;gt;Companyname&amp;lt;/th&amp;gt;
&amp;lt;th&amp;gt;Contactname&amp;lt;/th&amp;gt;
&amp;lt;th&amp;gt;Address&amp;lt;/th&amp;gt;
&amp;lt;th&amp;gt;City&amp;lt;/th&amp;gt;
&amp;lt;/tr&amp;gt;
&amp;lt;/HeaderTemplate&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;ItemTemplate&amp;gt;
&amp;lt;tr&amp;gt;
&amp;lt;td&amp;gt;&amp;lt;%#Container.DataItem("companyname")%&amp;gt;&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;&amp;lt;%#Container.DataItem("contactname")%&amp;gt;&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;&amp;lt;%#Container.DataItem("address")%&amp;gt;&amp;lt;/td&amp;gt;
&amp;lt;td&amp;gt;&amp;lt;%#Container.</description><guid>http://www.softxml.com/LearnTutorial.asp?id=575507144&amp;f=aspnet&amp;fo=tutorials</guid><category>aspnet</category></item><item><title>ASP.NET 2.0 - New Features</title><link>http://www.softxml.com/LearnTutorial.asp?id=26717152926&amp;f=aspnet&amp;fo=tutorials</link><description>&lt;p class="intro"&gt;ASP.NET 2.0 improves ASP.NET by adding several new features.&lt;/p&gt;
&lt;hr&gt;

&lt;h2&gt;Improvements in ASP.NET 2.0&lt;/h2&gt;
&lt;p&gt;ASP.NET 2.0 was designed to make web development easier and quicker.&lt;/p&gt;
&lt;p&gt;Design goals for ASP.NET 2.0:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Increase productivity by removing 70% of the code&lt;/li&gt;
	&lt;li&gt;Use the same controls for all types of devices&lt;/li&gt;
	&lt;li&gt;Provide a faster and better web server platform&lt;/li&gt;
	&lt;li&gt;Simplify compilation and installation&lt;/li&gt;
	&lt;li&gt;Simplify the administration of web applications&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;

&lt;h2&gt;What&amp;#8216;s New in ASP.NET 2.0?&lt;/h2&gt;
&lt;p&gt;Some of the new features in ASP.NET 2.0 are:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Master Pages, Themes, and Web Parts&lt;/li&gt;
	&lt;li&gt;Standard controls for navigation&lt;/li&gt;
	&lt;li&gt;Standard controls for security&lt;/li&gt;
	&lt;li&gt;Roles, personalization, and internationalization services&lt;/li&gt;
	&lt;li&gt;Improved and simplified data access controls&lt;/li&gt;
	&lt;li&gt;Full support for XML standards like, XHTML, XML, and WSDL&lt;/li&gt;
	&lt;li&gt;Improved compilation and deployment (installation)&lt;/li&gt;
	&lt;li&gt;Improved site management&lt;/li&gt;
	&lt;li&gt;New and improved development tools&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;b&gt;The new features are described below&lt;/b&gt;.&lt;/p&gt;
&lt;hr&gt;

&lt;h2&gt;Master Pages&lt;/h2&gt;
&lt;p&gt;ASP.NET didn&amp;#8216;t have a method for applying a consistent look 
and feel for a whole web site.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Master pages&lt;/b&gt; in ASP.NET 2.0 solves this problem.&lt;/p&gt;
&lt;p&gt;A master page is a template for other 
pages, with shared layout and functionality. The master page 
defines placeholders for content pages. 
The result page is a combination (merge) of the master page and the content page. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.w3schools.com/aspnet/aspnet_masterpages.asp"&gt;Read more about master pages&lt;/a&gt;.&lt;/p&gt;
&lt;hr&gt;

&lt;h2&gt;Themes&lt;/h2&gt;
&lt;p&gt;Themes is another feature of ASP.NET 2.0. Themes, or skins, allow 
developers to create a 
customized look for web applications.&lt;/p&gt;
&lt;p&gt;Design goals for ASP.NET 2.0 themes:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Make it simple to customize the appearance of a site&lt;/li&gt;
	&lt;li&gt;Allow themes to be applied to controls, pages, and entire sites &lt;/li&gt;
	&lt;li&gt;Allow all visual elements to be customized&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;

&lt;h2&gt;Web Parts&lt;/h2&gt;
&lt;p&gt;ASP.NET 2.0 Web Parts can provide a 
consistent look for a site, while still allowing user customization of style 
and content.&lt;/p&gt;
&lt;p&gt;New controls:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Zone controls - areas on a page where the content is consistent &lt;/li&gt;
	&lt;li&gt;Web part controls - content areas for each zone&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;

&lt;h2&gt;Navigation&lt;/h2&gt;
&lt;p&gt;ASP.NET 2.0 has built-in navigation controls like&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Site Maps&lt;/li&gt;
	&lt;li&gt;Dynamic HTML menus&lt;/li&gt;
	&lt;li&gt;Tree Views   &lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;

&lt;h2&gt;Security&lt;/h2&gt;
&lt;p&gt;Security is very 
important for protecting confidential and personal information.&lt;/p&gt;
&lt;p&gt;In ASP.NET 2.0 the following controls has been added:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;A Login control, which provides login functionality&lt;/li&gt;
	&lt;li&gt;A LoginStatus control, to control the login status&lt;/li&gt;
	&lt;li&gt;A LoginName control to display the current user name&lt;/li&gt;
	&lt;li&gt;A LoginView control, to provide different views depending on login 
	status&lt;/li&gt;
	&lt;li&gt;A CreateUser wizard, to allow creation of user accounts&lt;/li&gt;
	&lt;li&gt;A PasswordRecovery control, to provide the "I forgot my password" 
	functionality&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;

&lt;h2&gt;Roles and Personalization&lt;/h2&gt;
&lt;p&gt;Internet communities are growing very popular.&lt;/p&gt;
&lt;p&gt;ASP.NET 2.0 has personalization features for storing user details. This 
provides an easy way to customize user (and user group) properties.&lt;/p&gt;
&lt;hr&gt;

&lt;h2&gt;Internationalization&lt;/h2&gt;
&lt;p&gt;Reaching people with different languages is important if you want to reach a 
larger audience.&lt;/p&gt;
&lt;p&gt;ASP.NET 2.0 has improved support for multiple languages.&lt;/p&gt;
&lt;hr&gt;

&lt;h2&gt;Data Access&lt;/h2&gt;
&lt;p&gt;Many web sites are data driven, using databases or XML files as data sources.&lt;/p&gt;
&lt;p&gt;With ASP.NET this  
involved code, and often the same code had to be used over and over in different 
web pages.&lt;/p&gt;
&lt;p&gt;A key goal of ASP.NET 2.0 was to ease the use of data sources.&lt;/p&gt;
&lt;p&gt;ASP.NET 2.0 has new data controls, 
removing much of the need for programming and in-depth knowledge of data 
connections.&lt;/p&gt;
&lt;hr&gt;

&lt;h2&gt;Mobility Support&lt;/h2&gt;
&lt;p&gt;The problem 
with Mobile devices is screen size and display capabilities.&lt;/p&gt;
&lt;p&gt;In ASP.NET, the Microsoft Mobile Internet Toolkit (MMIT) provided this 
support.&lt;/p&gt;
&lt;p&gt;In ASP.NET 2.0, MMIT is no longer needed because mobile support is 
built into all controls.&lt;/p&gt;
&lt;hr&gt;

&lt;h2&gt;Images&lt;/h2&gt;
&lt;p&gt;ASP.NET 2.0 has new controls for handling images:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;The ImageMap control - image map support&lt;/li&gt;
	&lt;li&gt;The DynamicImage control  - image support for different browsers&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These controls are important for better image display on mobile devices, 
like hand-held computers and cell phones.&lt;/p&gt;
&lt;hr&gt;

&lt;h2&gt;Automatic Compilation&lt;/h2&gt;
&lt;p&gt;ASP.NET 2.0 provides automatic compilation. All files within a directory will be compiled on the first 
run, including support for WSDL, and XSD files.&lt;/p&gt;
&lt;hr&gt;

&lt;h2&gt;Compiled Deployment (Installation) and Source Protection&lt;/h2&gt;
&lt;p&gt;ASP.NET 2.0 also provides pre-compilation. An entire web site can be pre-compiled. This provides an 
easy way to deploy 
(upload to a server) compiled applications, and because only compiled files 
are deployed, the source code is protected.&lt;/p&gt;
&lt;hr&gt;

&lt;h2&gt;Site Management&lt;/h2&gt;
&lt;p&gt;ASP.NET 2.0 has three new features for web site configuration and management:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;New local management console&lt;/li&gt;
	&lt;li&gt;New programmable management functions (API)&lt;/li&gt;
	&lt;li&gt;New web-based management tool&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2&gt;Development Tools&lt;/h2&gt;
&lt;p&gt;With ASP.NET Visual Studio.NET was released with project and design features 
targeted at corporate developers.&lt;/p&gt;
&lt;p&gt;With ASP.NET 2.0, Visual Studio 2005 was released.&lt;/p&gt;
&lt;p&gt;Key design features for Visual Studio 2005 include:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Support for the features described above&lt;/li&gt;
	&lt;li&gt;Upload files from anywhere (FTP, File System, Front Page....</description><guid>http://www.softxml.com/LearnTutorial.asp?id=26717152926&amp;f=aspnet&amp;fo=tutorials</guid><category>aspnet</category></item><item><title>ASP.NET 2.0 - Master Pages</title><link>http://www.softxml.com/LearnTutorial.asp?id=41597576268&amp;f=aspnet&amp;fo=tutorials</link><description>&lt;p class="intro"&gt;Master pages provide templates for other pages on 
your web site. &lt;/p&gt;
&lt;hr&gt;

&lt;h2&gt;Master Pages&lt;/h2&gt;

&lt;p&gt;Master pages allow you to create a consistent look and behavior for all the pages 
(or group of pages) in your web application.&lt;/p&gt;
&lt;p&gt;A master page provides a template for other 
pages, with shared layout and functionality. The master page 
defines placeholders for the content, which can be overridden by content pages. 
The output result is a combination of the master page and the content page. &lt;/p&gt;

&lt;p&gt;The content pages contains the content you want to display. 
&lt;/p&gt;
&lt;p&gt;When users request the content page, 
ASP.NET merges the pages to produce output that combines the layout of the master page with the content 
of the content page.
&lt;/p&gt;
&lt;hr&gt;

&lt;h2&gt;Master Page Example:&lt;/h2&gt;

&lt;table class="ex" border="1" cellspacing="0" width="100%" ID="Table1"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;%@ Master %&amp;gt;

&amp;lt;html&amp;gt;
&amp;lt;body&amp;gt;
&amp;lt;h1&amp;gt;Standard Header For All Pages&amp;lt;/h1&amp;gt;

&amp;lt;asp:ContentPlaceHolder id="CPH1" runat="server"&amp;gt;
&amp;lt;/asp:ContentPlaceHolder&amp;gt;

&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;The master page above is a normal HTML page designed as a template for  
other pages.&lt;/p&gt;
&lt;p&gt;The &lt;b&gt;@ Master&lt;/b&gt; directive defines it as a master page.&lt;/p&gt;
&lt;p&gt;The master page contains a placeholder tag &lt;b&gt;&amp;lt;asp:ContentPlaceHolder&amp;gt;&lt;/b&gt; for 
individual content.&lt;/p&gt;
&lt;p&gt;The &lt;b&gt;id="CPH1"&lt;/b&gt; attribute identifies the placeholder, allowing many 
placeholders in the same master page.&lt;/p&gt;
&lt;p&gt;This master page was saved with the name &lt;b&gt;"master1.master"&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.w3schools.com/images/lamp.gif" alt="lamp" border="0" height="15" width="15"&gt; Note: The 
master page can also contain code, allowing dynamic content.&lt;/p&gt;


&lt;hr&gt;

&lt;h2&gt;Content Page Example:&lt;/h2&gt;

&lt;table class="ex" id="table2" border="1" cellspacing="0" width="100%"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;%@ Page MasterPageFile="master1.master" %&amp;gt;

&amp;lt;asp:Content
ContentPlaceHolderId="CPH1" runat="server"&amp;gt;

&amp;lt;h2&amp;gt;Individual Content&amp;lt;/h2&amp;gt;
&amp;lt;p&amp;gt;Paragrap 1&amp;lt;/p&amp;gt;
&amp;lt;p&amp;gt;Paragrap 2&amp;lt;/p&amp;gt;

&amp;lt;/asp:Content&amp;gt;&lt;/pre&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;The content page above is one of the individual content pages of the web.&lt;/p&gt;
&lt;p&gt;The &lt;b&gt;@ Page&lt;/b&gt; directive defines it as a standard content page.&lt;/p&gt;
&lt;p&gt;The content page contains a content tag &lt;b&gt;&amp;lt;asp:Content&amp;gt;&lt;/b&gt; with a reference 
to the master page (ContentPlaceHolderId="CPH1").&lt;/p&gt;
&lt;p&gt;This content page was saved with the name &lt;b&gt;"mypage1.aspx"&lt;/b&gt; &lt;/p&gt;
&lt;p&gt;When the user requests this page, ASP.NET merges the content page with the 
master page.&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://www.w3schools.com/aspnet/mypage1.aspx"&gt;Click to display mypage1.aspx.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.w3schools.com/images/lamp.gif" alt="lamp" border="0" height="15" width="15"&gt; Note: The 
content text must be inside the &amp;lt;asp:Content&amp;gt; tag. No content is allowed outside 
the tag.&lt;/p&gt;


&lt;hr&gt;

&lt;h2&gt;Content Page With Controls:&lt;/h2&gt;

&lt;table class="ex" id="table3" border="1" cellspacing="0" width="100%"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;%@ Page MasterPageFile="master1.</description><guid>http://www.softxml.com/LearnTutorial.asp?id=41597576268&amp;f=aspnet&amp;fo=tutorials</guid><category>aspnet</category></item><item><title>ASP.NET 2.0 - Navigation</title><link>http://www.softxml.com/LearnTutorial.asp?id=19646296956&amp;f=aspnet&amp;fo=tutorials</link><description>&lt;p class="intro"&gt;ASP.NET 2.0 has built-in navigation controls&lt;/p&gt;
&lt;hr&gt;

&lt;h2&gt;Web Site Navigation&lt;/h2&gt;
&lt;p&gt;Maintaining the menu of a large web site is difficult and time consuming.&lt;/p&gt;
&lt;p&gt;In ASP.NET 2.0 the menu can be stored in a file to make it easier 
to maintain. This file is normally called &lt;b&gt;web.sitemap&lt;/b&gt;, and is stored in 
the root directory of the web.&lt;/p&gt;
&lt;p&gt;In addition, ASP.NET 2.0 has three new navigation controls:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Dynamic menus&lt;/li&gt;
	&lt;li&gt;TreeViews&lt;/li&gt;
	&lt;li&gt;Site Map Path&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;

&lt;h2&gt;The Sitemap File&lt;/h2&gt;
&lt;p&gt;The following sitemap file is used in 
this tutorial:&lt;/p&gt;

&lt;table class="ex" id="table3" border="1" cellspacing="0" width="100%"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;?xml version="1.0" encoding="ISO-8859-1" ?&amp;gt;
&amp;lt;siteMap&amp;gt;
  &amp;lt;siteMapNode title="Home" url="/aspnet/w3home.aspx"&amp;gt;
  &amp;lt;siteMapNode title="Services" url="/aspnet/w3services.aspx"&amp;gt;
    &amp;lt;siteMapNode title="Training" url="/aspnet/w3training.aspx"/&amp;gt;
    &amp;lt;siteMapNode title="Support" url="/aspnet/w3support.aspx"/&amp;gt;
  &amp;lt;/siteMapNode&amp;gt;
  &amp;lt;/siteMapNode&amp;gt;
&amp;lt;/siteMap&amp;gt;&lt;/pre&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;Rules for creating a sitemap file:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;The XML file must contain a &amp;lt;siteMap&amp;gt; tag surrounding the content&lt;/li&gt;
	&lt;li&gt;The &amp;lt;siteMap&amp;gt; tag can only have one &amp;lt;siteMapNode&amp;gt; child node 
	(the "home" page)&lt;/li&gt;
	&lt;li&gt;Each &amp;lt;siteMapNode&amp;gt; can have several child nodes (web pages)&lt;/li&gt;
	&lt;li&gt;Each &amp;lt;siteMapNode&amp;gt; has attributes defining page title and 
	URL&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src="http://www.w3schools.com/images/lamp.gif" alt="lamp" border="0" height="15" width="15"&gt; 
&lt;b&gt;Note:&lt;/b&gt; The sitemap file must be placed in the root directory of the web and the 
URL attributes must be relative to the root directory.&lt;/p&gt;


&lt;hr&gt;

&lt;h2&gt;Dynamic Menu&lt;/h2&gt;
&lt;p&gt;The &amp;lt;asp:Menu&amp;gt; control displays a standard site 
navigation menu. &lt;/p&gt;
&lt;p&gt;&lt;b&gt;Code Example:&lt;/b&gt;&lt;/p&gt;

&lt;table class="ex" id="table8" border="1" cellspacing="0" width="100%"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;asp:SiteMapDataSource id="nav1" runat="server" /&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;form runat="server"&amp;gt;
&amp;lt;asp:Menu runat="server" DataSourceId="nav1" /&amp;gt;
&amp;lt;/form&amp;gt;&lt;/pre&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;The &lt;b&gt;&amp;lt;asp:Menu&amp;gt;&lt;/b&gt; control in the example above is a placeholder for a 
server created navigation menu.&lt;/p&gt;
&lt;p&gt;The data source of the control is defined by the &lt;b&gt;DataSourceId&lt;/b&gt; attribute. 
The &lt;b&gt;id="nav1"&lt;/b&gt; connects it to the  &lt;b&gt;&amp;lt;asp:SiteMapDataSource&amp;gt;&lt;/b&gt; control.&lt;/p&gt;
&lt;p&gt;The &lt;b&gt;&amp;lt;asp:SiteMapDataSource&amp;gt;&lt;/b&gt; control automatically connects to 
the default sitemap file (&lt;b&gt;web.sitemap&lt;/b&gt;).&lt;/p&gt;


&lt;p&gt;&lt;a target="_blank" href="http://www.w3schools.com/aspnet/w3services.aspx"&gt;Click here to see a demo of Menu, 
TreeView, and SiteMapPath&lt;/a&gt;&lt;/p&gt;


&lt;hr&gt;

&lt;h2&gt;TreeView&lt;/h2&gt;
&lt;p&gt;The &amp;lt;asp:TreeView&amp;gt; control displays a multi level navigation menu.&lt;/p&gt;
&lt;p&gt;The menu looks like a tree with branches that can be opened or closed with + 
or - symbol. &lt;/p&gt;
&lt;p&gt;&lt;b&gt;Code Example:&lt;/b&gt;&lt;/p&gt;

&lt;table class="ex" id="table6" border="1" cellspacing="0" width="100%"&gt;
&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;
&lt;pre&gt;&amp;lt;asp:SiteMapDataSource id="nav1" runat="server" /&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&amp;lt;form runat="server"&amp;gt;
&amp;lt;asp:TreeView runat="server" DataSourceId="nav1" /&amp;gt;
&amp;lt;/form&amp;gt;&lt;/pre&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;The &lt;b&gt;&amp;lt;asp:TreeView&amp;gt;&lt;/b&gt; control in the example above is a placeholder for a 
server created navigation menu.&lt;/p&gt;
&lt;p&gt;The data source of the control is defined by the &lt;b&gt;DataSourceId&lt;/b&gt; attribute. 
The &lt;b&gt;id="nav1"&lt;/b&gt; connects it to the  &lt;b&gt;&amp;lt;asp:SiteMapDataSource&amp;gt;&lt;/b&gt; control.&lt;/p&gt;
&lt;p&gt;The &lt;b&gt;&amp;lt;asp:SiteMapDataSource&amp;gt;&lt;/b&gt; control automatically connects to 
the default sitemap file (&lt;b&gt;web.sitemap&lt;/b&gt;).&lt;/p&gt;


&lt;p&gt;&lt;a target="_blank" href="http://www.w3schools.com/aspnet/w3services.aspx"&gt;Click here to see a demo of Menu, 
TreeView, and SiteMapPath&lt;/a&gt;&lt;/p&gt;


&lt;hr&gt;

&lt;h2&gt;SiteMapPath&lt;/h2&gt;
&lt;p&gt;The SiteMapPath control displays the trail (navigation path) to the current 
page. The path acts as clickable links to previous pages.&lt;/p&gt;
&lt;p&gt;Unlike the TreeView and Menu control the SiteMapPath control does &lt;b&gt;NOT&lt;/b&gt; use 
a SiteMapDataSource. The SiteMapPath control uses the web.sitemap file by default.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.w3schools.com/images/lamp.gif" alt="lamp" border="0" height="15" width="15"&gt; 
Tips: If the SiteMapPath displays incorrectly, most likely there is an URL error 
(typo) in the web.sitemap file.</description><guid>http://www.softxml.com/LearnTutorial.asp?id=19646296956&amp;f=aspnet&amp;fo=tutorials</guid><category>aspnet</category></item><item><title>ASP.NET Examples</title><link>http://www.softxml.com/LearnTutorial.asp?id=27880132080&amp;f=aspnet&amp;fo=tutorials</link><description>&lt;p&gt;&lt;b&gt;ASP.NET HTML Controls&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_htmlanchor"&gt;HTMLAnchor&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_htmlbutton"&gt;HTMLButton&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_htmlimage"&gt;HTMLImage&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_htmlimage2"&gt;HTMLImage 2&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_htmlinputbutton"&gt;HTMLInputbutton&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_htmlinputcheckbox"&gt;HTMLInputCheckbox&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_htmlinputhidden"&gt;HTMLInputHidden&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_htmlinputimage"&gt;HTMLInputImage&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_htmlinputradiobutton"&gt;HTMLInputRadiobutton&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_htmltable"&gt;HTMLTable&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_htmltable2"&gt;HTMLTable 2&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_htmltextarea"&gt;HTMLTextarea&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;&lt;b&gt;ASP.NET Web Controls&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_adrotator"&gt;AdRotator&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_button"&gt;Button&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_button2"&gt;Button 2&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_calendar"&gt;Calendar&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_calendar2"&gt;Calendar 2&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_calendar3"&gt;Calendar 3&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_checkbox"&gt;Checkbox&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_checkboxlist"&gt;CheckboxList&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_datalist1"&gt;DataList&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_datalist2"&gt;DataList with styles&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_datalist3"&gt;DataList with &amp;lt;AlternatingItemTemplate&amp;gt;&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_dropdownlist"&gt;DropdownList&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_hyperlink"&gt;Hyperlink&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_image"&gt;Image&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_imagebutton"&gt;ImageButton&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_label"&gt;Label&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_linkbutton"&gt;LinkButton&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_listbox"&gt;Listbox&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_literal"&gt;Literal&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_literal2"&gt;Literal 2&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_panel"&gt;Panel&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_radiobutton"&gt;Radiobutton&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_radiobuttonlist"&gt;RadiobuttonList&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_repeater1"&gt;Repeater&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_repeater2"&gt;Repeater with &amp;lt;AlternatingItemTemplate&amp;gt;&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_repeater3"&gt;Repeater with &amp;lt;SeparatorTemplate&amp;gt;&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_table"&gt;Table&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_table2"&gt;Table 2&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_textbox"&gt;Textbox&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_textbox2"&gt;Textbox 2&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_textbox3"&gt;Textbox 3&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_xml"&gt;XML&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;b&gt;ASP.NET Validation Controls&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_comparevalidator"&gt;CompareValidator&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_comparevalidator2"&gt;CompareValidator 2&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_customvalidator"&gt;CustomValidator&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_rangevalidator"&gt;RangeValidator&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_rangevalidator2"&gt;RangeValidator 2&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_regularexpvalidator"&gt;RegularExpressionValidator&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_reqfieldvalidator"&gt;RequiredFieldValidator&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_validationsum"&gt;Validationsummary&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_validationsum2"&gt;Validationsummary 2&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;&lt;b&gt;ASP.NET Events&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_pageload"&gt;Page_Load&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_pageispostback"&gt;Page.IsPostBack&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;&lt;b&gt;ASP.NET Data Binding&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_arraylist_radio1"&gt;ArrayList RadioButtonList&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_arraylist_drop1"&gt;ArrayList DropDownList&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_hashtable_radio1"&gt;Hashtable RadioButtonList 1&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_hashtable_radio2"&gt;Hashtable RadiobuttonList 2&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_hashtable_drop1"&gt;Hashtable DropDownList&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_sortedlist_radio1"&gt;SortedList RadioButtonList 1&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_sortedlist_radio2"&gt;SortedList RadiobuttonList 2&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.asp?filename=demo_sortedlist_drop1"&gt;SortedList DropDownList&lt;/a&gt;&lt;br&gt;
&lt;a target="_blank" href="http://www.w3schools.com/aspnet/showasp.</description><guid>http://www.softxml.com/LearnTutorial.asp?id=27880132080&amp;f=aspnet&amp;fo=tutorials</guid><category>aspnet</category></item></channel></rss>
