how to acces a parentcontainer from a user control

Discussion in 'ASP .Net' started by Support, Mar 30, 2005.

  1. Support

    Support Guest

    using vb.net ...

    I have a webpage: mainwebpage.aspx which inherits
    PORTAL.PORTALLOGIN.MANAGERIGHTS

    mainwebpage.aspx contains a placeholder: MyPlaceholder

    The control MyPlaceholder contains a usercontrol "ManageGeneral.ascx"
    which Inherits="PORTAL.ManageGeneralNameSpace.ManageGeneralWebControlCode"

    On the user control ManageGeneral.ascx I have a button which accesses a Sub
    in PORTAL.ManageGeneralNameSpace.ManageGeneralWebControlCode which in turn,
    I want it to access a function located in PORTAL.PORTALLOGIN.MANAGERIGHTS


    here is the function in PORTAL.PORTALLOGIN.MANAGERIGHTS:
    Public Sub DisplayMessage(ByVal answer As String, ByVal backcolor As
    System.Drawing.Color, ByVal forecolor As System.Drawing.Color)
    lblUPDATEMYRECORDfeedback.ForeColor = forecolor
    lblUPDATEMYRECORDfeedback.BackColor = backcolor
    lblUPDATEMYRECORDfeedback.Text = answer
    End Sub

    here is the function in
    PORTAL.ManageGeneralNameSpace.ManageGeneralWebControlCode

    Public Sub DisplayAnswer(ByVal answer As String, ByVal backcolor As
    System.Drawing.Color, ByVal forecolor As System.Drawing.Color)

    Private LoginManageRights As PORTAL.PORTALLOGIN.MANAGERIGHTS (this is
    actually placed below the Inherits...)
    LoginManageRights.DisplayMessage(answer, backcolor, forecolor)

    End Sub

    Is there a way to do that ?



    Thanks

    Terry
     
    Support, Mar 30, 2005
    #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. Mamcx
    Replies:
    0
    Views:
    499
    Mamcx
    Jun 26, 2003
  2. Mad Scientist Jr
    Replies:
    0
    Views:
    666
    Mad Scientist Jr
    Mar 22, 2006
  3. Replies:
    1
    Views:
    266
    Peter Hansen
    Jan 11, 2006
  4. Jonathan Wood

    User Control to Control Other User Control

    Jonathan Wood, Jan 24, 2010, in forum: ASP .Net
    Replies:
    4
    Views:
    572
    Jonathan Wood
    Feb 2, 2010
  5. fabrice

    acces controls on aspx page from user control

    fabrice, May 25, 2005, in forum: ASP .Net Building Controls
    Replies:
    2
    Views:
    126
    MasterGaurav
    May 26, 2005
Loading...

Share This Page