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
age
{
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
web, for handling events from a user control.
public class Default
{
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