1

If I'm writing in-line code on a .aspx page is it possible to override the onLoad of the class that the .aspx is directly inheriting from?

Right now if I do the override the base.onLoad inline on the .aspx page it is overriding the "Page" object's onLoad event not the class the .aspx is inheriting from.

Thanks for your help.

1 Answer 1

1

Did you try creating a class inline in your aspx page?

<script runat="server">
    public class MyPage : MyBaseClass
    {
        protected override OnLoad....
    }
</script>

and then have your aspx header inherit from MyPage

1
  • consider this answer for better understanding. Commented Apr 4, 2013 at 7:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.