spacer
Yehuda Shiran July 30, 2002
onload Event Handler
Tips: July 2002

Yehuda Shiran, Ph.D.
Doc JavaScript

Developer News
Microsoft Shows Off Silverlight 4, IE9 Plans
Metasploit Expands Vulnerability Test Framework
HyperCard Reborn?

ASP.NET pages may include JScript .NET code, much the same as an HTML page may include JavaScript code. JScript .NET uses the intrinsic event handler, Page_Load():

  public function Page_Load(sender:Object, E:EventArgs) : void {
    resultControl.Enabled = false;
  }
The server always runs the Page_Load() function when loading an ASP.NET page. The name of the function should always be Page_Load() or else the server won't do what you want it to do when loading the page. In this particular case, we disable the result ASP:TEXTBOX field (resultControl), because it is used only for displaying a calculation result:

  resultControl.Enabled = false;
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, 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