Re: Different renderings of <br/> and <br></br> in IE6
On 12 , 04:21, "Nathan Sokalski" wrote:
> Your code example of using the Literal control is great, except for one
> thing: It does not set the Mode property to PassThrough, which is necessary
> to avoid having the text converted to something that uses html character
> codes such as < and >. Because the Mode property cannot be set in the
> constructor, it requires an extra line of code. I think the message I am
> trying to get across in this thread is that it should not require this much
> extra code to simply add a server control that will usually have no
> attributes and have nothing changed during runtime except the visible
> property.
> --
> Nathan Sokalski
> njsokal...@hotmail.comhttp://www.nathansokalski.com/
>
> "marss" wrote in message
>
> news:1186561239.982143.245230@q75g2000hsh.googlegroups.com...
>
> > On 8 , 04:23, "Nathan Sokalski" wrote:
> >> I do not believe that is completely correct. As I mentioned in my
> >> original
> >> posting, I have used methods in VB.NET that generate <br></br> and I
> >> could
> >> not find a class that was a control, in other words, one that I could set
> >> properties for that would determine the attributes of the generated tag.
>
> > Rendering HtmlGenericControl("BR") in the form of "<br></br>" is no
> > more than bug
> > and you should not exploit this and try to customize.
>
> >> My workaround was to use the Literal control, but this required me to set
> >> the Mode and Text properties, which means longer code, which would not be
> >> necessary if there was a class for the <br/> tag.
>
> > Use LiteralControl from System.Web.UI namespace.
> > LiteralControl br = new LiteralControl("<br/>");
>
> > Regards, Mykola
> >http://marss.co.ua
We are talking about two different conrols.
Not Literal control from System.Web.UI.WebControls namespace but
LiteralControl control from System.Web.UI namespace.
Regards, Mykola
http://marss.co.ua
date: Sun, 12 Aug 2007 23:02:19 -0700
author: marss