Re: ASP.NET image - remove border attribute (c#)

Tech-Archive recommends: Fix windows errors by optimizing your registry



Teemu,

doesn't BorderStyle override BorderWidth ?



Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Teemu Keiski" <joteke@xxxxxxxxxxxxxxx> wrote in message
news:OxQ$tF2aFHA.2128@xxxxxxxxxxxxxxxxxxxxxxx
> If you specify it like this
>
> <asp:Image Runat="server" BorderWidth="0px" />
>
> That is, specify it explicitly that you have BorderWidth 0px when it in IE renders the
> width into style and there won't be the border attribute. To make it work with other
> browsers (styles work by default only with uplevel browsers), set Page's ClientTarget to
> uplevel (%@Page ClientTarget="uplevel"%)
>
> --
> Teemu Keiski
> ASP.NET MVP, Finland
>
> <kevanbulmer@xxxxxxxxx> wrote in message
> news:1118142839.302157.254050@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>> c#
>>
>> by default the 'border' attribute is added to an asp.net image, how do
>> i remove this attribute, as i cant validate my page as xhtml 1.1
>>
>> thanks
>> kb
>>
>
>


.