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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T21:54:18+00:00 2026-06-13T21:54:18+00:00

Here is my html tag, <asp:Label runat=server ID=rdPayOutstanding></asp:Label><br /> i wish to retrieve the

  • 0

Here is my html tag,

 <asp:Label runat="server" ID="rdPayOutstanding"></asp:Label><br />

i wish to retrieve the value which is within the span tags and display it in a textbox, I have written the code below but it doesnt seem to work.

Can anyone help with what the issue with my code is ?

$(document).ready(function () {
var amount = $('#rdPayOutstanding').text().toString();
console.log(amount);
$('.textfield').val(amount);
$('.jsPayOutstanding').click(function () {
    $('.textfield').val(amount);
});

$('.jsPaySomeBalance').click(function () {
    // alert('yes');
    $('.textfield').val('');
});
});
  • 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-13T21:54:19+00:00Added an answer on June 13, 2026 at 9:54 pm

    The problem is that you are using ASP.NET and when the controls render the ASP.NET engine modifies the ID of the resulting HTML elements.

    You can add an attribute ClientIDMode to get the “correct” id:

    <asp:Label runat="server" ID="rdPayOutstanding" ClientIDMode="Static"></asp:Label><br />
    

    Another approach is to use the attribute CssClass and select by class instead:

    <asp:Label runat="server" ID="rdPayOutstanding" CssClass="rdPayOutstanding"></asp:Label><br />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got an ASP.Net page in which I have an html anchor tag and
So I have a table full of tag keywords. Tags ------------------ asp sql html
In a separate question here on StackOverflow ( PHP library for HTML tag generation
Here is my HTML: <tr> <td colspan=2 class=borderBottomCell> <div class=benefitInfo style=WIDTH: 99%! important;> <asp:DropDownList
I have an anchor tag on an ASP.NET page, whose text (inner HTML) I
Please see code (Using knockout.js over ASP MVC 3): self.tags = ko.utils.arrayMap(@Html.Raw(new JavaScriptSerializer().Serialize(Model.Tags)), function(tag)
I have looked at the documentation here: http://docs.python.org/dev/library/xml.etree.elementtree.html#xml.etree.ElementTree.SubElement The parent and tag argument seems
Consider the following example: ( live demo here ) HTML: <div class=board> <div class=row>
Fiddle is here - http://jsfiddle.net/ashwyn/a45ha/ HTML here - <div class=parent> <div class=a>Class A</div> <div
http://subzerostudio.com/temp/verticalscroller/scroller/scroller.html Here's the fullscreen vertical scrolling site.. I've only tested it in FF so

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.