<br> and HtmlGenericControl - VS2003

M

Marius Horak

Teemu Keiski said:
You could just simply output a LiteralControl with <br> as text value.

LiteralControl lc=new LiteralControl("<br>");
myCell.Controls.Add(lc);

Yeah, it's what I've done.

Shame on you M$. Such simple thing and you could not get it right.

MH
 
T

Teemu Keiski

It is because HtmlGenericControl inherits from HtmlContainerControl so
probably it assumes tags are always containing ones, i.e it has opening and
closing tag. Generally such case should be handled with rendering, but
indeed that doesn't much give hope with dynamically creating controls (which
leads to using LiteralControl or inserting br into Cell's Text)

--
Teemu Keiski
MCP,Designer/Developer
Mansoft tietotekniikka Oy
http://www.mansoft.fi

AspInsiders Member, www.aspinsiders.com
ASP.NET Forums Moderator, www.asp.net
AspAlliance Columnist, www.aspalliance.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top