I have a custom control (simple, not composite) that has two properties,
Text and Maxlength. When I change the text property from the property
window to ello on the Set command of the text property (which means,
the code of the custom control), I set the property Maxlength to 13. The
value changes and it displayed the property window, under Maxlength as
13. But when I look at the html tag, it still shows whatever I had there
before. Here is the code. I guess my objective is to be able to set a
property in code (based on the value of another property, when it gets
changed) and reflect the change not only in the property window but also
in the html/xml tag of the custom control. I tried
PersistenceMode(PersistenceMode.Attribute) on my maxlength property,
but it still doesn't seem to work!
Public Class TextControl
Private [text_] As String = "[default]"
Private _MaxLength As Integer
Public Property MaxLength() As Integer
Set(ByVal Value As Integer)
_MaxLength = Value
Public Property [Text]() As String
Dim o As Object = ViewState("Text")
'Return IIf(o Is Nothing, String.Empty, CStr(o))
Set(ByVal Value As String)
If HasControls() Then
If Value = "hello" Then Me.MaxLength = 13
ViewState("Text") = Value
'Public Sub New()
' [text_] = "Test phrase"
Protected Overrides Sub rendercontents(ByVal output As
Henrique de Souza (MCP - Analysts International)
*** Sent via Developersdex http://www.yqcomputer.com/ ***
Don't just participate in USENET...get rewarded for it!