[thelist] asp:net Call a sub from within <script>

VOLKAN ÖZÇELİK volkan.ozcelik at gmail.com
Wed Dec 7 23:58:55 CST 2005

For these and similar issues, I have an overridden class for Page
(named GenericPage)

Skipping the details, it has the following methods defined:

protected virtual void Page_BeforeLoad(object sender, EventArgs e) {}
protected virtual void Page_AfterLoad(object sender, EventArgs e) {}
protected virtual void Page_FirstLoad(object sender, EventArgs e) {}
protected virtual void Page_PostBack(object sender, EventArgs e) {}

Then I override Page_Load

private void Page_Load(object sender, EventArgs e) {
	if(IsPostBack) {OnPostBack(e);}
	else {OnFirstLoad(e);}
And OnInit:
protected override void OnInit(EventArgs e) {
	base.OnInit (e);

	Load       += new EventHandler(Page_Load);
	BeforeLoad += new EventHandler(Page_BeforeLoad);
	AfterLoad  += new EventHandler(Page_AfterLoad);
	FirstLoad  += new EventHandler(Page_FirstLoad);
	PostBack   += new EventHandler(Page_PostBack);

Volkan Ozcelik
+>Yep! I'm blogging! : http://www.volkanozcelik.com/volkanozcelik/blog/
+> My projects/studies/trials/errors : http://www.sarmal.com/

More information about the thelist mailing list