spacer
Yehuda Shiran July 30, 2002
onload Event Handler
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

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 >
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