Monday, July 16, 2007

ASP.NET Control Styles

I feel like a complete idiot.  You CAN give ASP.NET controls element level style information.  E.G.:

<asp:Label ID="lbl" runat="server" Text="Hi" Style="border: solid 10px Blue;" />

I assumed this wasn't possible, and that you had to use skins or something, simply because "Style" doesn't come up on the intellisense for an ASP.NET control, and it does for a regular html control like <input type="button" /> ... etc. VS 2005 will even give you help with writing the style once you are in the double quotes after the Style attribute.  Sometimes I feel like instead of spending time with my family, or enjoying a good game, I should spend every moment of my life I'm not at work reading about stuff I use at work.  :-(  I guess I'll just keep looking at example source code and such to keep learning all these little nuances, tips, tricks, and design patterns.  I figured this one out while figuring .skin files out while looking over the StarterSite that comes with SubSonic.

1 comment:

Jonah Thomas said...

You should spend 100% of your time not at work with your family. Work is for working. Not working is for not working.

Not that I know that much about work, I can't even pedal a Trike or Bike yet...

You could do like my daddy and spend 30 minutes to an hour a day learning something new. He does this at lunch or in the morning when no work gets done anyway since everyone and their uncle stops by to talk about important things like if the Wii is still sold out...

Assuming you are learning about something that will be helpful for your job, no good manager will complain... as long as you are not up against a deadline or something. In fact, most companies will even pay for training or buy you a few (dozen) books to help keep you sharp... but you might want to buy them yourself if you want to keep them long term.

Good idea to run this by your manager first though, other wise he might say "No Sir!" and then you will have LOTS of free time to learn stuff.

Got to go find my binky and blanky so I can spend some quality time in my sweet crib.

Disqus for A Nofsinger's Blog