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
Post a Comment