spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / javascript / column115


JScript .NET, Part IX: Code Behind

Technical Lead
Thomson Reuters (Markets) LLC
US-NY-New York

Justtechjobs.com Post A Job | Post A Resume
Developer News
Microsoft Shows Off Silverlight 4, IE9 Plans
Metasploit Expands Vulnerability Test Framework
HyperCard Reborn?


The IsPrime Consumer's ASP.NET Page

The ASP.NET page is much shorter when the code is behind. Here is the page for consuming the IsPrime Web service, IsPrimeConsumerForm.aspx:

<%@ Page LANGUAGE="JScript" SRC="IsPrimeConsumerForm.aspx.js" 
  INHERITS="ASPPlus.codeBehind" %>
<HTML>
<HEAD>
  <TITLE>IsPrime XML Web Service Test</TITLE>
</HEAD>
<BODY STYLE="font-size:12; font-family:arial,verdana,sans-serif;">
  <FORM RUNAT="server">
    <TABLE BORDER="0">
      <TR>
        <TD ALIGN="middle"><ASP:TEXTBOX ID="first" RUNAT="server" SIZE="4" 
          STYLE="text-align:'right'"/></TD>
        <TD ALIGN="middle"><ASP:LABEL ID="resultControl" RUNAT="server"/></TD>
      </TR>
      <TR>
        <TD><ASP:BUTTON TEXT="Is Prime?" ID="isprime" OnClick="Submit_Click" 
          RUNAT="server"/></TD>
      </TR>
    </TABLE>
  </FORM>
</BODY>
</HTML>

We have three controls. The first ASP:TextBox control serves for inputting the number to be tested. We use the resultControl ASP:Label to display the result of the check, "is not a prime number" or "is a prime number". The last control is the isprime ASP:Button. When clicked, the function Submit_Click() is called from the Code Behind.


Next: A Final Word

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

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

webref The latest from WebReference.com Browse >
Rolling Out Your Own HTML Application Version Control · HTML 5: Client-side Storage · Working with Ajax Server Extensions
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Wi-Fi Product Watch, November 2009 · Chip Market Recovering From '08 Collapse · Low-Cost Tools to Kickstart Your New Business


Produced by Yehuda Shiran and Tomer Shiran
All Rights Reserved. Legal Notices.
Created: July 29, 2002
Revised: July 29, 2002

URL: http://www.webreference.com/js/column115/9.html