Link to home
Start Free TrialLog in
Avatar of Chaffe
ChaffeFlag for Afghanistan

asked on

Insert HTML inside <asp:panel> control in ASP.NET 2.0

I have a string of HTML (<u><i>hello</i></u>) that I would like to be able to insert inside <asp:panel></asp:panel>  is there way to do this programatically (from VB).
Also, the 2.0 framwork has classes such as HTMLAnchor, HTMLButton, etc... is there a anything that would let me access the HTML <div> tag and it's innerHTML.  That way, I don't have to use <asp:panel>.
Thanks.
Avatar of craskin
craskin
Flag of United States of America image

if you store all that HTML to a string, you could set the text of an asp:Label to that string and it should render out your HTML.
Avatar of Chaffe

ASKER

craskin, I thoguht about that too, but I'd rather store it in a <div> instead of <span> so I can have a little more flexibility.  Any thoughts?
ASKER CERTIFIED SOLUTION
Avatar of Jason Scolaro
Jason Scolaro
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Chaffe

ASKER

Jason, this works.  But do you think I could be facing performance issues if I start doing this with big chunks of html strings?
Chaffe,

I don't think you would have any sort of performance issues versus any other option.  What is it that is being output in these big chucks of html strings?  The performance issue you'd probably need to concern yourself with is simply how much data is being sent to the browser... if the HTML string gets insanely large, then it would take a while for the browser to download it... but other than that.. you should be fine.

-- Jason
Avatar of Chaffe

ASKER

Makes sense.  Thanks a lot for all of your help.  I see you're the featured Expert now.  You certainly deserve it Jason.