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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T16:52:53+00:00 2026-05-29T16:52:53+00:00

I have one label control as <asp:Label runat=server ID=label1 Visible=false CssClass=label1css></asp:Label> So I am

  • 0

I have one label control as

<asp:Label runat="server" ID="label1" Visible="false" CssClass="label1css"></asp:Label>

So I am assigning some value to this label control. So how I will get that assigned value by using its class name in jQuery.

  • 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-29T16:53:00+00:00Added an answer on May 29, 2026 at 4:53 pm

    (Edit: from the comment asp:Label controls are rendered as span elements, so…)

    HTML labelspan elements don’t have a “value”. If you mean the content of the labelspan element in the sense of <label>Content</label><span>Content</span> then try this:

    $(".label1css").text()
    // OR
    $(".label1css").html()
    

    If you mean that you are going to assign a “value” attribute along the lines of <label value="whatever"><span value="whatever"> then try:

    $(".label1css").attr("value")
    

    Note that this will not work if more than one element has that same “label1css” class – the “.label1css” selector will get all matching elements and then the .text() or .html() or .attr() method will get a value from the first matching element. From the name “label1css” it sounds like you are making the class name unique, which will work but really you should be using the id attribute for this purpose.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using one DataGrid with templatecolumn of Asp:Label Control. In Design Page i
Using ASP.Net MVC 1.0 I have a form with some input control on it.
I have an issue with the following text display: <asp:RegularExpressionValidator ID=Password_RegularExpValidate runat=server Text=TEST! Display=Dynamic
I have a datalist <asp:DataList ID=dlstImage runat=server RepeatDirection=Horizontal RepeatColumns=5 CellSpacing=8> <ItemTemplate> <asp:ImageButton ID=Image runat=server
I have been using the ASP.NET AJAX UpdatePanel control a lot lately for some
I have one label field and three buttons with the name of red, yellow,
This is my problem, I have one textbox, one button and one label. Everything
I have three button named(titled) hello, nothing, heaven and one label (IBOutlet UIlabel lab).
I have a ComboBox with a label function like this one: private function fieldLabelFunction(item:Object):String
I have one website on my server, and my IIS Worker Process is using

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.