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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T15:03:37+00:00 2026-05-10T15:03:37+00:00

I am in the process of beginning work on several ASP.NET custom controls. I

  • 0

I am in the process of beginning work on several ASP.NET custom controls. I was wondering if I could get some input on your guys/girls thoughts on how you apply styling to your controls.

I would rather push it so CSS, so for the few controls I have done in the past, I have simply stuck a string property which allows you so type in the string which in then slung in a "style" attribute when rendering. I know I could also use the "CSSClass" property and apply the "class" attribute.

I have not done much in the way of creating a "proper" Style property (in which you actually save the style object, and use the designer to specify its values). This to me seems like a lot of work, and TBH, I hate the Style editor UI and would much rather type in the CSS/class name to apply..

What are your thoughts on this?


Note: This is kind of subjective – so to be clear:

The accepted answer will be the one that:

  • Offers the pro’s and con’s of the various approaches.
  • Opinions are welcome, but a good answer should be constructive.
  • Backs it up with some real-world knowledge/experience.

There is nothing wrong with subjectivity. There is a problem with people being subjective and not thinking, being constructive or actually providing some insight and experience.

>>DO NOT<< tag this as "subjective" – that tag is a waste of time. "subjective" is not a technology or a category that people will look for. Fix the question rather than brush it off.

  • 1 1 Answer
  • 1 View
  • 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. 2026-05-10T15:03:37+00:00Added an answer on May 10, 2026 at 3:03 pm

    It would depend on how the custom controls are being used – A commercial, re-distributable control should be compliant with the VS IDE, and behave the way users expect it to when they implement the control.

    On the other hand there is no point in wasting a lot of time to get styling to work if you or your team are the only ones to use the control, so long as it’s styling works in a sane way.

    Most of the custom controls I have implemented use a property to define the controls look and feel or just expose the controls’ members own CSSClass properties.

    The argument comes down to consistency vs. time – any element should use consistent styling mechanisms, if strapped for time, use a string method if not, implement a more complex / IDE friendly mechanism.

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

Sidebar

Related Questions

I work on a fairly large ASP .NET Web Forms application that is currently
I have a .net file that utilizes a c# to process some form(post) information,
I'm at the very beginning of learning ASP.NET WebForms. Right now I'm starting to
So, I am beginning the process of coding a PHP application website, which will
We are beginning work on sharepoint 2007 site and I am looking for ways
I'm trying to get a Mercurial in-process hook to run on Windows. The problem
I'm trying to debug Sitecore 6 ASP.NET code using Visual Studio 2008 (Windows Server
I have a python script that runs a subprocess to get some data and
We have an ASP.NET MVC 3 web site which isn't working after it's deployed
I have a button that on click event I get some information from the

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.