Adding a persistable TextBox property

Discussion in 'ASP .Net Web Controls' started by Jason Barnett, Aug 26, 2010.

  1. I've developed a control that inherits from TextBox. I created a property
    that gets rendered into a HiddenField, which is altered by javascript at run
    time. The HiddenField is initialized during OnInt, and added to the controls
    collection during CreateChildControls. Also, I've overridden the
    LoadPostData method to retrieve the property value based on the HiddenField's
    ID.

    All works well, but I'm concerned about the last step (retrieving the value
    during LoadPostData). I'm curious if there is a way to get ASP.NET will
    restore the ViewState of the child control for me. Is anyone aware of a
    better way to handle this?
     
    Jason Barnett, Aug 26, 2010
    #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. S. Justin Gengo
    Replies:
    0
    Views:
    553
    S. Justin Gengo
    Jul 16, 2003
  2. Hazzard
    Replies:
    2
    Views:
    569
    Yan-Hong Huang[MSFT]
    Jul 23, 2003
  3. Natty Gur
    Replies:
    0
    Views:
    481
    Natty Gur
    Jul 22, 2003
  4. Dave

    Adding a new property to a textbox

    Dave, Feb 24, 2004, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    209
    Sarmad Aljazrawi
    Feb 24, 2004
  5. Jurjen de Groot
    Replies:
    0
    Views:
    317
    Jurjen de Groot
    May 19, 2008
Loading...

Share This Page