spacer
Yehuda Shiran July 27, 2002
Writing an ASP.NET Page
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

An ASP.NET page is similar to an HTML page. It includes tags and event handlers. The tags' syntax is similar to that of HTML tags. You write event handlers in JScript .NET. Let's take the add Web service as an example. To call the add Web service, we use only two ASP.NET tags: ASP:BUTTON and ASP:TEXTBOX. All of ASP.NET's tag parameters are specified within the opening brackets, so you can end them with a "/" inside the opening brackets, or with a "/" concatenated with the tag name, in separate closing brackets. The following two formats are valid:

  <ASP:TEXTBOX ...... />
  <ASP:TEXTBOX ........></ASP:TEXTBOX>
ASP.NET pages are saved with the extension .aspx. Our ASP.NET page that consumes the add Web service is simpleCalcConsumer.aspx. Here is the BODY section of the ASP.NET page:

<BODY STYLE="font-size:12; font-family:arial,verdana,sans-serif;">
    <FORM METHOD="post" 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