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

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -