asp.net - Adding a table to a particular Div in the codebehind? -


just testing, made page nothing form , div tags and, in codebehind, created table, added rows it, used following code add table page:

page.controls.add(dtstatuses); 

what i'd now, though, add table particular div. instance, if have div tag id of "testdiv", how can add above table (dtstatuses) div, code in codebehind?

just set runat="server" div

<div id="testdiv" runat="server"></div> 

and add control this

testdiv.controls.add(dtstatuses); 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -