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

  • Home
  • SEARCH
  • 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 8479159
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:56:49+00:00 2026-06-10T18:56:49+00:00

How can I recover a Css class that was add via JQuery in my

  • 0

How can I recover a Css class that was add via JQuery in my <asp:TextBox> component ?

Example:

ASPX

<asp:TextBox ID='txtTest' runat='server' CssClass='inputText'></asp:TextBox>

JQUERY

$('#txtTest').addClass('testClass');

Page Renderized

<input type='text' ID='txtTest' CssClass='inputText testClass' />

Code Behind

How can I recover the testClass that was add via Jquery in my <asp:TextBox> component ?

I tryied this.txtTest.CssClass but return just inputText class.

  • 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-10T18:56:50+00:00Added an answer on June 10, 2026 at 6:56 pm

    You won’t be able to retrieve this because changes to style aren’t even submitted in the request. ASP.NET will reconstruct the object from what “it knows” about it, that is, the original markup in this case.

    If you must keep track of this, then you are going to have to add the new class to a hidden element and retrieve it on code-behind:

    <input type="hidden" id="addedClasses" name="addedClasses" />
    

    Then the jQuery part:

    $('#txtTest').addClass('testClass');
    $('#addedClasses').val('testClass');
    

    And on code behind:

    string addedClasses = Request.Params["addedClasses"];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an unfinished binary file that has some info that I can recover
I was wondering how you can recover data from your logfile. I'm using sql
How can I recover/extract image from Button (BackgroundImage Property) in Visual Basic 2010 Express/Visual
I would like a CSS hover affect for multiple links that affect the same
I was wondering how i can recover all the files in a directory at
When the device I am communicating with sends binary data, I can recover most
I accidentally deleted my Gemfile rm Gemfile Can I recover it or recreate one?
I have accidentally deleted a Java file from my Eclipse workspace. Can i recover
Can anyone let me know how can we change the value of kendo combobox
Can I order my users in the database, so I don't have to say

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.