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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:57:56+00:00 2026-05-18T04:57:56+00:00

I have a site that gets deployed to over a dozen clients. The main

  • 0

I have a site that gets deployed to over a dozen clients. The main website has a base template, and each client has a client folder that overrides the colours. The problem is that there are a lot of CSS files, so making a change that forces us to update every client takes a long time. The automated build process takes care of replacing the updated files.

I would like to change the CSS files to be usercontrols instead, and those usercontrols could then inherit from another usercontrol where client specific values are stored.

So instead of having a forms.css file and then a /client/forms.css file I would have a Forms.ascx file that inherits from a usercontrol that contains the colours.

Ex:

<%@ Control Language="C#" ClassName="Forms" %>
<%@ Register TagPrefix="css" TagName="Client" Src="~/css/ClientStyling.ascx" %>

/* CSS Document */
body
{
  color:<%=Client.BodyColor%>
}

Then the masterpage would inherit from the usercontrol instead. This would make the maintenance of the client sites much easier.

So is this solution efficient and recommended? Or is there a better way to accomplish the same end result?

If this is possible, would it also be possible to have the Forms.ascx control output the markup as CSS? Or make the extension .css and still have the ascx properties?

  • 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-18T04:57:57+00:00Added an answer on May 18, 2026 at 4:57 am

    Instead of a Web Control, you’re likely better off creating a Generic Handler. This won’t have the overhead that a web control has.

    1. In your handler, accept the clientID via querystring – this allows you to cache on a client level
    2. In your .master file, you can link to it < link src=”MyCssHandler.ashx?ClientID=<%=ClientID%>” >

    In your handler you have a few ways to work with the CSS.

    1. Just have a bunch of response.write for the css, and put in relevant client values
    2. Create an external CSS file with it’s own special identifier – maybe <% %>. You could then load all the client specific values in a NameValuePair Collection, and then loop through the external CSS file, parsing <% NAME %> and replacing with the correct value. Then response.write this file. More complicated true but it allows for a hell of a lot cleaner CSS files
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a site that is using x509 client certificates (2 way SSL) to
I have a site that usually has news items at the top of the
I have a site that has a simple HTML button in a form. All
I have a web site that gets a new page every couple weeks, and
I have a web site that is throwing OutOfMemoryExceptions on whenever it gets to
I've got a drupal site that gets low traffic, but has tons of new
I have started writing an application that gets in a certain website and gets
I'm creating a web site that I think must have a client side database.
I have a public facing hobby site that gets about 3000 unique visitors a
I have a site that gets completely screwed up in IE, and I was

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.