Render with Div Tag

S

shapper

Hello,

I am creating a custom control using CreateChildControls:

1 Protected Overrides Sub CreateChildControls()
2 lContent.SkinID = Me.SkinID
3 MyBase.Controls.Add(lContent)
4 MyBase.CreateChildControls()
5 Me.ChildControlsCreated = True
6 End Sub ' CreateChildControls

I notice that all child controls are placed inside a span tag. Is it
possible to switch to a div tag instead?

Thanks,

Miguel
 
K

kbutterly

Miguel,

If I understand you, try adding this to your code:

Protected Overrides ReadOnly Property TagKey() As
System.Web.UI.HtmlTextWriterTag
Get
Return HtmlTextWriterTag.Div
End Get
End Property

Good luck,
Kathryn
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top