Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding html to a placeholder control on the fly

Tags:

asp.net

I am a generic markup which I load at runtime froma file as follows:

<div id="pagewidth" >
<div id="header" > Head </div>
        <div id="wrapper" class="clearfix" > 
        <div id="twocols" class="clearfix"> 
            <div id="column2" > Main Content Column </div>
            <div id="column3" > right Column </div>
        </div> 
        <div id="column1" > Left Column </div>

Footer

I want to add this to a place holder control in asp.net web page. How do I do it?

like image 973
chugh97 Avatar asked Dec 04 '25 10:12

chugh97


1 Answers

Add the html string to an asp:Literal control and then add the literal control to the placeholder's control collection.

like image 166
Paul Hiles Avatar answered Dec 07 '25 11:12

Paul Hiles



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!