Mantain Property

Discussion in 'ASP .Net Building Controls' started by Mike, Mar 14, 2005.

  1. Mike

    Mike Guest

    Hi,
    I don't know how to mantain the value of a Property of my WebCustomControl.
    I've my Control and set:
    ------Code in Page container of contrl ----...
    ....
    if(!IsPostBack)
    myControl.DataSource = myDataSource;
    myControl.DataTextField = "TextField";
    myControl.DataValueField = "ValueField";
    .....

    ------ Code in Contrl -----
    .....
    public string DataTextField
    {
    get{return this._dataTextField;}
    set{_dataTextField = value;}
    }
    ....

    and when PostBack raised the value of this propertys are null :(
    I can mantain the value using Session, but is little elegante.

    Someone has an example about this?

    THANKS!
     
    Mike, Mar 14, 2005
    #1
    1. Advertising

  2. Mike

    Guest

    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. Jonathan

    Mantain ViewState

    Jonathan, Mar 9, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    428
    =?Utf-8?B?VmlzYXIgR2FzaGk=?=
    Mar 9, 2005
  2. billie
    Replies:
    3
    Views:
    306
    Sybren Stuvel
    Oct 5, 2005
  3. Jonathan

    Mantain ViewState

    Jonathan, Mar 10, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    103
    Jonathan
    Mar 10, 2005
  4. Mike

    Mantain Property

    Mike, Mar 14, 2005, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    109
    Brock Allen
    Mar 14, 2005
  5. Alessandro Benedetti

    How to mantain the state between 2 call of the same WebService?

    Alessandro Benedetti, Mar 17, 2005, in forum: ASP .Net Web Services
    Replies:
    13
    Views:
    228
    Brock Allen
    Mar 17, 2005
Loading...

Share This Page