User control handling events coverting code to VB from C#

Discussion in 'ASP .Net Web Controls' started by ree32, Sep 21, 2004.

  1. ree32

    ree32 Guest

    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
     
    ree32, Sep 21, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    4
    Views:
    14,167
    Jonathan Bromley
    Apr 8, 2005
  2. JVSFugitive

    Coverting Ascii Hexidecimal Number

    JVSFugitive, Nov 3, 2004, in forum: Java
    Replies:
    3
    Views:
    3,384
    Thomas Weidenfeller
    Nov 3, 2004
  3. niels

    Coverting xml to PDF

    niels, Sep 12, 2003, in forum: XML
    Replies:
    1
    Views:
    404
  4. Narendra

    coverting EST to PST

    Narendra, Dec 21, 2005, in forum: Python
    Replies:
    0
    Views:
    369
    Narendra
    Dec 21, 2005
  5. MostafaSayed

    Help in coverting image formats

    MostafaSayed, Jun 25, 2007, in forum: .NET
    Replies:
    0
    Views:
    358
    MostafaSayed
    Jun 25, 2007
Loading...

Share This Page