Render with Div Tag

  • Thread starter Thread starter shapper
  • Start date Start date
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
 
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
 
Back
Top