CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 1 of 1
  1. #1
    Join Date
    May 2004
    Posts
    474

    Can't get text of ASP label

    I have this JQuery code:

    $("#<%= FundingRequested_11.ClientId %>").html(funding.toFixed(2));

    Then after the user clicks another button I want to grab the text that is in FundingRequested_11 like this:

    Decimal.TryParse(Me.FundingRequested_11.Text, .FundingRequested)

    But the value of FundingRequested_11's text is "" despite there being something in there!

    What is going on? Computers can be so stupid sometimes.

    I also tried $("#<%= FundingRequested_11.ClientId %>").text(funding.toFixed(2));

    and

    $("#<%= FundingRequested_11.ClientId %>").val(funding.toFixed(2));

    and in the VB code:

    Decimal.TryParse(Me.FundingRequested_11.Attributes("html", .FundingRequested) etc. (ie also val and text)

    Nothing works. Despite the fact I can see the label's text change it comes back as "0" or Nothing. Arghh!
    Last edited by richiebabes; February 18th, 2013 at 11:57 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured