A
Ahmet Gunes
Hi Friends,
I'm building a web control. I came to a point that I have to persist a property (especially TabIndex) in the control's tag when the control is dropped on a Web form.
I tried several methods but none of them worked. Here is one of the methods I tried:
<PersistenceMode(PersistenceMode.Attribute), DefaultValue(-1)> Public Overrides Property TabIndex() As Short
Get
Return MyBase.TabIndex
End Get
Set(ByVal Value As Short)
MyBase.TabIndex = Value
End Set
End Property
And either in the Constructor or Init methods I set TabIndex to "0".
What I want is to get an HTML script as follows when I drop the control on a web form:
<cc3:MyTextBoxHighlight id="MyTextBoxHighlight1" style="Z-INDEX: 102; LEFT: 336px; POSITION: absolute; TOP: 176px"
runat="server" HighlightColor="192, 0, 0" TabIndex="0"></cc3:MyTextBoxHighlight>
But unfortunately, the TabIndex="0" attribute is not shown until I manually change it in the Properties window.
Can anyone help? Is what I try to do possible?
Thanks in advance,
AG
I'm building a web control. I came to a point that I have to persist a property (especially TabIndex) in the control's tag when the control is dropped on a Web form.
I tried several methods but none of them worked. Here is one of the methods I tried:
<PersistenceMode(PersistenceMode.Attribute), DefaultValue(-1)> Public Overrides Property TabIndex() As Short
Get
Return MyBase.TabIndex
End Get
Set(ByVal Value As Short)
MyBase.TabIndex = Value
End Set
End Property
And either in the Constructor or Init methods I set TabIndex to "0".
What I want is to get an HTML script as follows when I drop the control on a web form:
<cc3:MyTextBoxHighlight id="MyTextBoxHighlight1" style="Z-INDEX: 102; LEFT: 336px; POSITION: absolute; TOP: 176px"
runat="server" HighlightColor="192, 0, 0" TabIndex="0"></cc3:MyTextBoxHighlight>
But unfortunately, the TabIndex="0" attribute is not shown until I manually change it in the Properties window.
Can anyone help? Is what I try to do possible?
Thanks in advance,
AG