User control handling events coverting code to VB from C#

R

ree32

I am new to VB.net so I am not sure how to translate this C# code I saw on the
web, for handling events from a user control.

public class Default:page
{
protected Panel headerPanel, footerPanel;
protected void Page_Load(object sender, EventArgs e)
{
//Load the Header Control
Control headerControl = LoadControl("header.ascx");
//Load the Footer Control
Control footerControl = LoadControl("footer.ascx");
//Wire-Up the EventHandler of Header Control
//With the method from the Footer Control
((header)headerControl).ColorChanged+=
new ColorChangedEventHandler(((footer)footerControl).UpdateLabel);
//Add the Header Control to the Panel
headerPanel.Controls.Add(headerControl);
//Add the Footer Control to the Panel
footerPanel.Controls.Add(footerControl);
}
}
}


Here is a link to the whole page of the C3 code
-http://www.mastercsharp.com/article.aspx?ArticleID=67&&TopicID=2

thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,439
Members
44,829
Latest member
PIXThurman

Latest Threads

Top