This post originated from an RSS feed registered with Web Buzz
by Josh Baltzell.
Original Post: Using a label to hold HTML code in .NET
Feed Title: ShortDomainName.com
Feed URL: http://www.contegix.com/Rss.aspx
Feed Description: Weblog of Josh Baltzell. Focusing on the computer industry and .NET programming related news. I like to get involved on the discussions wherever they are.
My friend Mike told me a while ago that you could put HTML in to a label in .NET. I never really used it until now, but it could be pretty powerful. I am just doing it to preview an HTML email I am putting together in a program I am writing (stop whining about HTML email everyone, they are cool.)
All you do is set the text property of the label to the HTML and it just shows it on the form when it renders. Cool huh?
'Drop a label on the form named label1
label1.text = “<H1>HTML?!?</H1><BR>You mean people <I>still</I> write <B>that</B> by hand sometimes?!?”
After you type that in the form appears like this:
HTML?!?
You mean people still write that by hand sometimes?!?