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

Yehuda Shiran, Ph.D.
Doc JavaScript

Developer News
Google Going Native With Chrome
Mozilla Fixes Firefox Flaws as 3.5 Release Nears
Microsoft and Novell Still Bosom Buddies

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, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
XML and PHP Simplified · Creating a ASP.NET Contact Form · Data Filtering with PHP
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Intel to Host Live Nehalem Q&A · 12 Tips to Troubleshoot Network File-Sharing · 10 Tips for Selling on Kijiji