all groups > asp.net building controls > may 2004 >
You're in the

asp.net building controls

group:

Prevent tag properties automaticaly generated by ASP.NET



Prevent tag properties automaticaly generated by ASP.NET Henri
5/20/2004 1:35:21 AM
asp.net building controls: When I use System.Web.UI.WebControls.Image, ASP.NET automaticaly outputs :
<img border="0" />
Is there a way to prevent this border="0" to be added, without creating a
custom Control?


Re: Prevent tag properties automaticaly generated by ASP.NET Teemu Keiski
5/20/2004 11:23:54 AM
Hi,

Image control works such that if the BorderWidth property is considered to
be empty, it outputs the '0', And this logic happens in rendering phase of
the Image control, so it can be changed, unless you write a custom control
or use <img runat="server">, that is a HTML server control. They are
rendered exactly as you want them to be.

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke


[quoted text, click to view]

Re: Prevent tag properties automaticaly generated by ASP.NET Henri
5/24/2004 2:15:53 PM
Thanks a lot for your help Teemu!
I use HtmlControls.HtmlImage instead of WebControls.Image and everything's
OK now!

"Teemu Keiski" <joteke@aspalliance.com> a écrit dans le message de
news:OWHfIPkPEHA.3220@TK2MSFTNGP09.phx.gbl...
[quoted text, click to view]


AddThis Social Bookmark Button