Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8766763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:37:58+00:00 2026-06-13T16:37:58+00:00

I have a control used by multiple web pages. In this control I’m running

  • 0

I have a control used by multiple web pages. In this control I’m running a stored proc to get a user’s permission level. I then store this in an invisible label.
In the pages that this menu control is loaded in different things happen based on the permission level, mostly buttons being enabled/disabled.
My question is can I access the label I’ve put in the menu control (.ascx) from the VB of the pages it’s in? and if yes, how?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T16:37:59+00:00Added an answer on June 13, 2026 at 4:37 pm

    There are couple ways.
    Say your label is this:

    <asp:Label ID="lblPermission" runat="server" Text="Label"></asp:Label>
    

    1: You can get the VALUE of the label like.

    Public ReadOnly Property Permission As String
         Get
             Return lblPermission.Text
         End Get
     End Property
    

    2: Get the LABEL itself like:

     Public ReadOnly Property LblPermission As Label
         Get
             Return lblPermission
         End Get
     End Property
    

    3: Find the lable inside the UC (MyMenuUC1 below) is the id of the menu usercontrol:

    Dim lblPermission As Label = CType(MyMenuUC1.FindControl("lblPermission"),Label)
    

    4: Grab string like this:

    Dim permission As String = CType(MyMenuUC1.FindControl("lblPermission"),Label).Text
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I used to have an embedded user control in an ASP.NET web site which
I have created a compound control that I am reusing in multiple activities. This
We have a solution with multiple web projects, and there are some pages that
I have a custom control which is used on many pages. I am making
I have multiple custom controls used on a ASPX (and C#) page registered from
I have a legacy VB6 ActiveX control used in IE to provide control of
i have used segment control for distance measuring in km or Miles so if
I have used the silverlight control in CRM 2011.It also published on form but
I have written a user control that captures some user input and has a
I have a control circuit which has multiple settings and may have any number

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.