spacer
Yehuda Shiran July 18, 2002
ASP.NET's Syntax
Tips: July 2002

Yehuda Shiran, Ph.D.
Doc JavaScript

Developer News
News Flash: Adobe Has iPhone Workaround
Adobe's Flash 10.1 Goes Mobile (Minus iPhone)
A Salute to Visionary CEOs

The syntax of ASP.NET is very similar to HTML. It is based on tags, also called controls. Each tag has its own parameters which control its appearance and behavior. You can mix ASP.NET and HTML tags. The ASP.NET tags run on the server, while the HTML tags run on the client. The information displayed by the browser is regular HTML; so you don't know exactly, just by looking at the browser, what is running where. The ASP.NET tags have two parameters in common: RUNAT="server" and ID. The ID parameter is used for event handlers and other references. Here is an example BODY for an ASP.NET page:

<BODY STYLE="font-size:12; font-family:arial,verdana,sans-serif;">
  <FORM RUNAT="server">
  <TABLE BORDER="0">
  <TR><TD>Enter First Number:</TD><TD><ASP:TEXTBOX 
    RUNAT="server" SIZE="4" ID="first" STYLE="text-align:'right'"/></TD></TR>
  <TR><TD>Enter Second Number:</TD><TD><ASP:TEXTBOX 
    RUNAT="server" SIZE="4" ID="second" STYLE="text-align:'right'"/></TD></TR>
  <TR><TD align="right"><ASP:BUTTON TEXT="Add" ID="doAdd" 
    OnClick="Submit_Click" RUNAT="server"/></TD><TD><HR></TD></TR>
  <TR><TD></TD><TD><ASP:TEXTBOX ID="resultControl" 
    RUNAT="server" STYLE="text-align:'right'" SIZE="4"/></TD></TR>
  </TABLE>
  </FORM>
</BODY>
To learn more about JScript .NET and ASP.NET, go to Column 113, JScript .NET, Part VII: Consuming add from ASP.NET.


People who read this tip also read these tips:

Look for similar tips by subject:

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Building a Banking Application Home Page with OOP · Mixing Scripting Languages · Review: phpFox, a Social Networking CMS with all the Bells and Whistles
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Enterprise 2.0: Social Networking in the Cloud · BroadSoft Marketplace Hastens Pace of Telephony Innovation · Review: HTC Hero for Sprint