|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Design Time referencing of PropertiesHi
I am writing a webcontrol, that has two properties, both are strings. Based on the value of the first property, I want set the default values of the second property. I am trying to set the default values of the second property using typeconverter that inherits stringconverter and overriding GetStandardValueCollection. In the method GetStandardValueCollection , How do I referece prop1 (use the value of prop1)?. Thanks Venkat RefreshPropertiesAttribute might help you on what you're trying to do. I
don't think there's a need for TypeConverter here. You can do this: Dim _t1 As String <RefreshPropertiesAttribute(RefreshProperties.All), DefaultValue("")> _ Public Property T1() As String Get Return _t1 End Get Set(ByVal Value As String) _t1 = Value End Set End Property Dim _t2 As String Public Property T2() As String Get Select Case _t1 Case "1" _t2 = "A" Case "2" _t2 = "B" Case "3" _t2 = "C" End Select Return _t2 End Get Set(ByVal Value As String) _t2 = Value End Set End Property Hope this helps... JoNaS Show quoteHide quote "Venkat" wrote: > Hi > > I am writing a webcontrol, that has two properties, both are strings. Based > on the value of the first property, I want set the default values of the > second property. I am trying to set the default values of the second property > using typeconverter that inherits stringconverter and overriding > GetStandardValueCollection. In the method GetStandardValueCollection , How do > I referece prop1 (use the value of prop1)?. > > Thanks > Venkat
Other interesting topics
ITemplate - Dynamic ImageButton in BindLabelColumn for DataList
Getting value from child control of formview Embedding CSS with inline code "Protect" or Disable Editing of A Webcontrol SmartNavigation Problem/Bug Reports and the ReportViewer GridView Data Binding at runtime Dataset from ObjectDataSource always null? GUID and data controls DotNet & SDK install issue |
|||||||||||||||||||||||