troubleshooting Question

VB to C# - Handles MyBase.Load

Avatar of kgjertsen
kgjertsen asked on
.NET ProgrammingVisual Basic.NETEditors IDEs
7 Comments1 Solution4813 ViewsLast Modified:

I am converting some VB code to C# for use in a website and I have a problem.

All of the pages have a base class, that includes a Page Load event.:

Private Sub BasePage_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

'Some Code.

End Sub

Every website page derives from this page. The base page Load code fires first, then the derived page Load code.

I need to use the same approach in C#, but the Handles MyBase.Load is not supported in C#.

Can anyomne provide the C# equivelant?

Many thanks,
Join our community to see this answer!
Unlock 1 Answer and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros