inherits TextBox and new properties at runtime

Discussion in 'ASP .Net' started by ross_smith, Jul 13, 2005.

  1. ross_smith

    ross_smith Guest

    Hi, I created a class in ap.net using vb.net that inherits from
    Textbox. I added a few of my own properties and methods, set it up to
    appear in the toolbox. And have used it. My properties that appear on
    the toolbar work fine at design time. I set them at design time and all
    works fine. I can access them later, they retain value and work.

    However, when I try to set them at run time, they set but when the page
    posts back, the data has reverted back the defaults. My user properties
    are not retaining value during the postback. SOOOOOO the question is
    how do I get my user properties to retain values during postback if set
    at runtime? Thanks.
     
    ross_smith, Jul 13, 2005
    #1
    1. Advertisements

  2. Are you persisting the property values in ViewState? When setting them,
    put them in ViewState, and also when getting the value, ask for it from
    ViewState.
     
    Craig Deelsnyder, Jul 15, 2005
    #2
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.