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 3755618
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T09:43:35+00:00 2026-05-19T09:43:35+00:00

I am trying to bind a string that contains the ClientID of one user

  • 0

I am trying to bind a string that contains the ClientID of one user control to the property of another control within a GridView template column. I get the error ‘lblVar02’ is not declared. It may be inaccessible due to its protection level. How do I do this?

<uc:CriteriaType id="ctVar02" runat="server" 
    OnClientChange="<%# &quot;toggle('&quot; & lblVar02.ClientID & &quot;');&quot; %>"></uc:CriteriaType>
<uc:Label ID="lblVar02" runat="server" />
  • 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-05-19T09:43:35+00:00Added an answer on May 19, 2026 at 9:43 am

    For anyone else having this problem, this could’ve been solved three different ways that I know of.

    1. Don’t pass in the ClientID and change the JavaScript to crawl through the DOM (this.parentNode.getElementsByTagName or something) looking for the other control. This solution seemed flimsy to me since the Id’s could possibly change.
    2. Set the property in the RowDataBound event. This would be simple, but my page is huge and since this would occur after TrackViewState(), it would add unneeded bloat to my ViewState.
    3. Move the lblVar02 control inside the ctVar02 control. This is what I ended up doing. I was trying to bind the JavaScript call to my user control property so I could then bind it to a client-side “click” event of a label control inside my user control. By moving the one user control inside of the other I was able to bind the JavaScript call with the ClientID directly to the client-side “click” event of the label.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to bind a simple one-line string to a textbox's text property but
Trying to bind a String to a RichTextBox.Text property so that when the String
Edit: I am trying to bind a single view model object that contains a
I'm trying to bind a XAML ComboBox so that its list items are the
I'm trying to bind a selected user's role to a dropdown-list. The purpose of
I have a specialized string dictionary of (string, string) (_RulesAndTheirDescriptions) that contains the name
I'm trying to write a simple program that will receive a string of max
I'm trying to bind a second level property of my class to a combobox.
I am new to WPF and am trying to create a WPF control that
I am trying to bind a JTextField to a bean's field that is a

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.