protected override void OnLoad(EventArgs e) { base.OnLoad(e); if ( Page.IsPostBack ) { ServerFormatSSN(); IsValid=bIsValid; } if ( Page.ClientTarget.ToLower()!="downlevel" ) { Page.RegisterClientScriptBlock( "FormatSSNClientScript", "<" + "SCRIPT Language=JavaScript SRC=\"FormatSSN.js\"></" + "SCRIPT>"); } }
Example 3: OnLoad method of FormatSSN.