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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T19:15:49+00:00 2026-05-12T19:15:49+00:00

I have style sheet with a class name changebackgroundcolor i want make change in

  • 0

I have style sheet with a class name “changebackgroundcolor” i want make change in css class at run time that color will change.

.changebackgroundcolor{
background-color: #21606E;}

if i change the back ground code in my color picker then it will make change here permanently.

is there any jquery for this or any asp.net code.

What i do for this?

  • 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-12T19:15:49+00:00Added an answer on May 12, 2026 at 7:15 pm

    Is it possible to edit or modify css
    file at run time?

    It is possible, but it’s not advisable. What you’re proposing is to make your asp.net application into a file editor. That would involve raising the privileges for your application’s security context (the user under which it runs) which opens a big can of worms.

    The simplest alternative is to inject classes into your asp.net page by writing a new <style type="text/css"> element to your page that includes the css classes you want to produce dynamically.

    For example, you might save the background-color to a UserSettings table (or any other per-user persistence mechanism), then load it into your .aspx page like this:

    <style type="text/css">
        .changebackgroundcolor {
            background-color: <%= user.BackgroundColor %>;
        }
    </style>
    

    Or you could keep the class definitions in a css file. Instead of emitting the classes directly into the page, dynamically write some jQuery code to change the definition of the class, following some of the examples from other answers.

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

Sidebar

Related Questions

I have created a custom style sheet that overrides the original CSS for my
I have an xsl:fo style sheet that refers to a URL which is an
I'm editing a CSS style sheet in Eclipse and I constantly have to copy
I have to access CSS class by name, and the code below works. However
I have an XSL style sheet for which I need to add some custom
I have a link to some style sheet from the Yahoo Developer Network, this
So I have come up with the following style sheet in jsfiddle http://jsfiddle.net/8FNZE/2/ and
I have a website consisting of an index.html, a number of style sheet files
I have built a wicket component that contains input/labels and methods to change presentation
For example I might have some css stuff that looks like this: .divType1 {

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.