|
The Code Below Will Allow you to Create a Object of TemplateBuilder Class.
The TemplateBuilder Class Can be used to Create Runtime Templates for the DataList control.
The TemplateBuilder class has a Method AppendLiteralString() which accepts string format and you can Type the HTML tags that you want in the Header
Dim ht As New System.Web.UI.TemplateBuilder
Can display any content
ht.AppendLiteralString("Any Content You Want to Display")
You can also Display Values from DataSets
ht.AppendLiteralString(qst.Rows(0)(1))
Setting the Template object with the DataList
The DataList Has Properties for
HeaderTemplate
FooterTemplate
ItemTemplate
all these templates can be set using these Properties
DataList1.HeaderTemplate = ht
DataList1.FooterTemplate = ht
DataList1.ItemTemplate = ht
Hope this Solution comes handy
Regards
Applies to
|