Custom Control Class within a class

Discussion in 'ASP .Net Building Controls' started by ryan.d.rembaum@kp.org, Feb 7, 2006.

  1. Guest

    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???
     
    , Feb 7, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jonah Olsson
    Replies:
    1
    Views:
    588
    Scott Allen
    Apr 5, 2005
  2. =?Utf-8?B?SmF5YnVmZmV0?=
    Replies:
    9
    Views:
    858
    Phillip Williams
    Feb 21, 2006
  3. J R M
    Replies:
    2
    Views:
    442
    Charlie@CBFC
    Jun 1, 2006
  4. Matt Sokol
    Replies:
    2
    Views:
    409
    Theo Tillotson
    Aug 7, 2003
  5. Jonah Olsson
    Replies:
    2
    Views:
    211
    Jonah Olsson
    Apr 5, 2005
Loading...

Share This Page