html - How to add controls to stringbuilder? -


dim dropdownlist new dropdownlist dropdownlist.id = "ddllist2"    dim strb new stringbuilder strb.append("<div id='test1' runat='server'>") strb.append(dropdownlist) strb.append("</div>") strb.append("title") divid.innerhtml=strb.tostring 

output

the page showing "system.web.ui.webcontrols.dropdownlist"
can 1 tell me, how add controls stringbuilder??

if want add controls dynamically need use << anycontrol >>.controls.add() method. recommended in pre-init.

you can't add control stringbuilder. purpose not rendering server side controls. methods, internally typecast objects string if object not of type string. more information check msdn


Comments

Popular posts from this blog

mod rewrite - Using "?" when rewriting the URL -

.htaccess: Transfer name to index.php if not directory public -

Admob integration with pygame in android -