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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T23:46:17+00:00 2026-05-30T23:46:17+00:00

I am trying to assign a asp.net label using JavaScript and then whenever label

  • 0

I am trying to assign a asp.net label using JavaScript and then whenever label text get changed to trigger Ajax UpdatePanal and update a grid based on text in the label.

This is what I have currently tried:

        `function ChangeTeam(sPARENT_ID, sPARENT_NAME) {
            alert("me1");
            document.getElementById("Label4").value = "Text 123";
            document.forms[0].submit();
        }
        function PopupHelp(page) {
            var url = page;
            window.open(url,'Select','width=600,height=600,status=0,resizable=1,scrollbars=1,toolbar=0,location=1');
        }'

So what this is actually doing is: User click on a button under PAGE1 a new windows opens with PAGE2, PAGE2 contains checkboxes for user to select, once the user has made the selection on PAGE2 the selection ID is passed via JavaScript back to PAGE1 CHANAGETEAM() function where that function should populate a hidden label “Label4” and then based on that population of the label Ajax Panel should trigger and update a grid with the ID selected.

With the code I have above it gets back into CHANGETEAM() function and sends that alert ME1 but looks like nothing past that works. What am I doing wrong?

Thanks for your help.

  • 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-30T23:46:18+00:00Added an answer on May 30, 2026 at 11:46 pm

    The way .NET’s controls are named on the page vs their IDs how they’re rendered are different. If you inspect the source code of the rendered page, it’s probably something along the lines of UpdatePanel1_Label4 instead of just Label4.

    Besides hardcoding that name in, you can also get the rendered Id with the ClientId Property. So your code can look like

    document.getElementById('<%= Label4.ClientID %>').value = "Text 123";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Greetings, I'm trying to select item from asp.net list box then assign it to
I am trying to assign a specific width to my image in asp.net (using
I'm using asp.net and trying to assign roles for a user with forms authentication
I have an asp.net mvc application and i am trying to assign value to
I'm working on an application using ASP.NET MVC 1.0 and I'm trying to inject
Link I'm using ASP.NET with C# and trying to use linq to sql to
I'm trying to assign a variable from a html text input value and then
I'm trying to assign blue text like this, exactly like this I'm using my
I am trying to develop the single page in asp.net web mobile application as
I am trying to add ASP.NET MVC features (especially routing) to my already existing

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.