Custom Control Class within a class

R

ryan.d.rembaum

I think that this problem might relate to another that I posted. I did
a page trace of my custom control and see that OnInit is called every
time a button is clicked. In my oninit event I declare a use an
instance of a control from a sub class as follows:

Class MySpecialTable
Class MySpecial Cell
....
End Class

dim cell1 as new myspecialCell

Protected Overrides Sub OnInit(ByVal e As EventArgs)
tablerow.add
Rows(0).cells.add(mySpecialCell)
end sub
End Class

My problem is that Class MySpecialCell has a custom property whose
value is not being save between posts and I have tried everything I can
think of. I am wondering if it is because of the fact that I declare a
new instance. I don't think this should matter since the view state
functions come later, but I have tried messing with postbackdatahandler
with no luck, so was thinking maybe this might be the cause??? Has
anyone run into this before? Why is MySpecialCell not saving its
custom property between posts???
 

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
474,266
Messages
2,571,090
Members
48,773
Latest member
Kaybee

Latest Threads

Top