Tuesday, March 13, 2012

Textbox Appearance

I'm in the process of converting a previous website over to ASP.net and have found that the textboxes appearance changes when I run it wih .net

The border is thinner and blue opposed to the standard textbox.

Any ideas?TextBoxes are rendered by the browser, not by ASP.NET. The difference you're seeing has more to do with the version of your browser and/or operating system you're running.
Yes, that would make sense. Is there anyway around this to maintain the original appearance?
Hi,

it's best that you use CSS for this. The TextBox control (and all controls that inherit from WebControl) have a CssClass property where you can place your CSS class in. It's good practice to have these kind of "features" in an external .css file. So when you want to update your site's colors you only have to do your changing in 1 place.

Grz, Kris.

0 comments:

Post a Comment