S
Shapper
Hello,
I have a class which I am calling as follows:
...
column.ItemTemplate = CreateItemTemplate()
...
Function CreateItemTemplate() As ITemplate
Return New ItemTemplate
End Function
...
Class ItemTemplate
Implements ITemplate
ReadOnly Property ITemplate_dptpt() As HtmlControl
Get
Dim _dptpt As HtmlControl
_dptpt = New HtmlGenericControl
_dptpt.Attributes.Add("class", "dptpt")
Return _dptpt
End Get
End Property
ReadOnly Property ITemplate_dengb() As HtmlControl
Get
' Div: dengb
Dim _dengb As HtmlControl
_dengb = New HtmlGenericControl
_dengb.Attributes.Add("class", "dengb")
Return _dengb
End Get
End Property
Public Sub InstantiateIn(ByVal container As Control) Implements
ITemplate.InstantiateIn
container.Controls.Add(ITemplate_dptpt)
container.Controls.Add(ITemplate_dengb)
End Sub 'InstantiateIn
End Class
What I need is to add ITemplate_dptpt OR ITemplate_dengb according to
the value in Session("culture").
I think the best way is to use only one class, i.e., ItemTemplate and
try some how to have some king of condition inside the class.
How can I do this?
Thanks,
Miguel
I have a class which I am calling as follows:
...
column.ItemTemplate = CreateItemTemplate()
...
Function CreateItemTemplate() As ITemplate
Return New ItemTemplate
End Function
...
Class ItemTemplate
Implements ITemplate
ReadOnly Property ITemplate_dptpt() As HtmlControl
Get
Dim _dptpt As HtmlControl
_dptpt = New HtmlGenericControl
_dptpt.Attributes.Add("class", "dptpt")
Return _dptpt
End Get
End Property
ReadOnly Property ITemplate_dengb() As HtmlControl
Get
' Div: dengb
Dim _dengb As HtmlControl
_dengb = New HtmlGenericControl
_dengb.Attributes.Add("class", "dengb")
Return _dengb
End Get
End Property
Public Sub InstantiateIn(ByVal container As Control) Implements
ITemplate.InstantiateIn
container.Controls.Add(ITemplate_dptpt)
container.Controls.Add(ITemplate_dengb)
End Sub 'InstantiateIn
End Class
What I need is to add ITemplate_dptpt OR ITemplate_dengb according to
the value in Session("culture").
I think the best way is to use only one class, i.e., ItemTemplate and
try some how to have some king of condition inside the class.
How can I do this?
Thanks,
Miguel