VB ASP.Net WebControl

M

Mythran

I have a control that inherits from WebControl. There are 2 properties that
react to each other (IE: When you change the value of one property, it
modifies the value of the other, and the same when you modify the other
value, it modifies the first value).

So, quick example of my problem.

I change Property2 to 12.
I view the html source (design-mode).
Property2 = 12.
Property1 = 0.

I change Property1 to 21.
I view the html source (design-mode).
Property2 = 12.
Property1 = 21.

Now, in my properties, I am doing something to the effect of:

Public Property Property1() As Decimal
Get
Return CDec(ViewState("Property1"))
End Get
Set
ViewState("Property1") = Value
ViewState("Property2") = Massage1(Value)
End Set
End Property

Public Property Property2() As Decimal
Get
Return CDec(ViewState("Property2"))
End Get
Set
ViewState("Property1") = Massage2(Value)
ViewState("Property2") = Value
End Set
End Property

In design-mode, when I change either property value, both property values
are updated and displayed in the properties window correctly. But when I
view the html for the page, in design mode, I see the original value for the
property that I did NOT change.

How can I achieve both properties being updated in the html for the aspx
page when the value for one of the properties gets manually changed in the
property window?

Thanks!

Mythran
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,787
Messages
2,569,629
Members
45,332
Latest member
LeesaButts

Latest Threads

Top