Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
ASP.NET Reference
ASP.NET Page Syntax

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework General Reference
ASP.NET Page Syntax

The topics in this section describe the markup syntax that you can use to declaratively create ASP.NET pages or user controls, which are text files that have .aspx or .ascx file name extensions, respectively.

An ASP.NET page is defined as a file in a Web application with an .aspx file name extension with an HTML form element that specifies runat="server". You can optionally specify an @ Page directive or other directive (as appropriate to the type of page that you are creating), one or more Web server controls, and server code.

NoteNote:

The mapping of file name extensions to ASP.NET is done by Internet Information Services (IIS).

NoteNote:

You must include your HTML form element within <html> and <body> tags. Some browsers will return an error if you exclude these tags.

NoteNote:

If you want your pages to conform to XHTML standards, you must include additional elements, such as a DOCTYPE element. For details, see ASP.NET and XHTML.

The following example shows a basic ASP.NET page.

<%@ Page Language="VB" %>
<html>
  <body>
    <form runat="server">
    </form>
  </body>
</html>
ASP.NET Syntax for HTML Server Controls

Defines the syntax that you can use to declaratively author and programmatically manipulate HTML elements on an ASP.NET page or user control.

ASP.NET Syntax for Web Server Controls

Defines the syntax that you can use to declaratively author and programmatically manipulate Web server controls on an ASP.NET page.

ASP.NET Syntax for Validation Server Controls

Defines the syntax that you can include in an ASP.NET page or user control to declaratively author server controls that validate user input.

ASP.NET Server Controls

Describes how you can use server controls when you build ASP.NET pages and user controls.

Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker