D
Dales
In a composite control, here's my CreateChildControls Sub-Procedure...
Protected Overrides Sub CreateChildControls()
Me.Controls.Clear()
_txtDate = New TextBox
_txtDate.ID = _txtDate.ClientID
_txtDate.CssClass = "FormElementEnabled"
_txtDate.Text = _txtInitialValue
_txtDate.MaxLength = 10
_txtDate.Attributes.Add("size", "11")
Me.Controls.Add(_txtDate)
End Sub
When my control renders on the page, here's what the class attribute
comes out looking like (notice the "'s and the redundant
"class="):
<input name="Date1:_ctl0" type="text" value="mm/dd/yyyy"
maxlength="10" class="class="FormElementEnabled"" size="11"
/>
Does anyone have any idea why CssClass is not working? Why should I
have to use the Attributes collection to add a value to the class
attribute when CssClass should do it for me? I haven't seen this
problem before.
Any ideas?
Protected Overrides Sub CreateChildControls()
Me.Controls.Clear()
_txtDate = New TextBox
_txtDate.ID = _txtDate.ClientID
_txtDate.CssClass = "FormElementEnabled"
_txtDate.Text = _txtInitialValue
_txtDate.MaxLength = 10
_txtDate.Attributes.Add("size", "11")
Me.Controls.Add(_txtDate)
End Sub
When my control renders on the page, here's what the class attribute
comes out looking like (notice the "'s and the redundant
"class="):
<input name="Date1:_ctl0" type="text" value="mm/dd/yyyy"
maxlength="10" class="class="FormElementEnabled"" size="11"
/>
Does anyone have any idea why CssClass is not working? Why should I
have to use the Attributes collection to add a value to the class
attribute when CssClass should do it for me? I haven't seen this
problem before.
Any ideas?