How to know that viewstates a control save ? for example a DropDownList control.

Discussion in 'ASP .Net' started by xu, Nov 21, 2003.

  1. xu

    xu Guest

    Thanks!
    xu, Nov 21, 2003
    #1
    1. Advertising

  2. Can u please rephrase that? Not sure if I got it right...

    If you are loking for the option for the state on a dropdownlist to be stored on
    viewstate then what you are looking for is the enableviewstate property. This is
    a common property in webcontrols.

    Joao Cardoso (MVP dotNET)
    =======================================================
    [LusoCoders]- http://groups.yahoo.com/group/lusocoders/
    [PontoNetPT]- http://www.programando.net/regras.aspx
    .n.o-s.p-a.m - www.acinet.pt
    =======================================================
    Joao S Cardoso [MVP], Nov 21, 2003
    #2
    1. Advertising

  3. xu

    xu Guest

    Thank your reply.

    I want to know what properties of a control will be need to re-initialize by
    programmer,what properties of a control will be assigned by viewstates or
    postback-date automatically when a page are postbacking.


    "Joao S Cardoso [MVP]" <-o.s-p.a-m> дÈëÏûÏ¢ÐÂÎÅ
    :...
    > Can u please rephrase that? Not sure if I got it right...
    >
    > If you are loking for the option for the state on a dropdownlist to be

    stored on
    > viewstate then what you are looking for is the enableviewstate property.

    This is
    > a common property in webcontrols.
    >
    > Joao Cardoso (MVP dotNET)
    > =======================================================
    > [LusoCoders]- http://groups.yahoo.com/group/lusocoders/
    > [PontoNetPT]- http://www.programando.net/regras.aspx
    > .n.o-s.p-a.m - www.acinet.pt
    > =======================================================
    xu, Nov 24, 2003
    #3
  4. xu

    Teemu Keiski Guest

    Hi,

    general rule is that those properties that are posted by default by the
    control, are not persisted in ViewState weheras those proeprties that can't
    be maintained without ViewState mechanism are again persisted through it.

    TextBox's Text is an example of property that is posted automatically.
    ViewState is used with it, but to detect if the value ahs been changed since
    last postback (which is informed by raising TextChanged event). Sae idea is
    with DropDownList, SelectedItem and SelectedIndexChanged event.

    --
    Teemu Keiski
    MCP, Microsoft MVP (ASP.NET), AspInsiders member
    ASP.NET Forum Moderator, AspAlliance Columnist



    "xu" <> wrote in message
    news:...
    > Thank your reply.
    >
    > I want to know what properties of a control will be need to re-initialize

    by
    > programmer,what properties of a control will be assigned by viewstates or
    > postback-date automatically when a page are postbacking.
    >
    >
    > "Joao S Cardoso [MVP]" <-o.s-p.a-m> дÈëÏûÏ¢ÐÂÎÅ
    > :...
    > > Can u please rephrase that? Not sure if I got it right...
    > >
    > > If you are loking for the option for the state on a dropdownlist to be

    > stored on
    > > viewstate then what you are looking for is the enableviewstate property.

    > This is
    > > a common property in webcontrols.
    > >
    > > Joao Cardoso (MVP dotNET)
    > > =======================================================
    > > [LusoCoders]- http://groups.yahoo.com/group/lusocoders/
    > > [PontoNetPT]- http://www.programando.net/regras.aspx
    > > .n.o-s.p-a.m - www.acinet.pt
    > > =======================================================

    >
    >
    Teemu Keiski, Nov 24, 2003
    #4
  5. xu

    xu Guest

    I mean if the property of a control will be posted or persisted in ViewState
    when i use it, the point isn't explained in the documents. If can i be aware
    of it by testing only?

    "Teemu Keiski" <> дÈëÏûÏ¢ÐÂÎÅ
    :...
    > Hi,
    >
    > general rule is that those properties that are posted by default by the
    > control, are not persisted in ViewState weheras those proeprties that

    can't
    > be maintained without ViewState mechanism are again persisted through it.
    >
    > TextBox's Text is an example of property that is posted automatically.
    > ViewState is used with it, but to detect if the value ahs been changed

    since
    > last postback (which is informed by raising TextChanged event). Sae idea

    is
    > with DropDownList, SelectedItem and SelectedIndexChanged event.
    >
    > --
    > Teemu Keiski
    > MCP, Microsoft MVP (ASP.NET), AspInsiders member
    > ASP.NET Forum Moderator, AspAlliance Columnist
    >
    >
    >
    > "xu" <> wrote in message
    > news:...
    > > Thank your reply.
    > >
    > > I want to know what properties of a control will be need to

    re-initialize
    > by
    > > programmer,what properties of a control will be assigned by viewstates

    or
    > > postback-date automatically when a page are postbacking.
    > >
    > >
    > > "Joao S Cardoso [MVP]" <-o.s-p.a-m> дÈëÏûÏ¢ÐÂÎÅ
    > > :...
    > > > Can u please rephrase that? Not sure if I got it right...
    > > >
    > > > If you are loking for the option for the state on a dropdownlist to be

    > > stored on
    > > > viewstate then what you are looking for is the enableviewstate

    property.
    > > This is
    > > > a common property in webcontrols.
    > > >
    > > > Joao Cardoso (MVP dotNET)
    > > > =======================================================
    > > > [LusoCoders]- http://groups.yahoo.com/group/lusocoders/
    > > > [PontoNetPT]- http://www.programando.net/regras.aspx
    > > > .n.o-s.p-a.m - www.acinet.pt
    > > > =======================================================

    > >
    > >

    >
    >
    xu, Nov 25, 2003
    #5
    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. Bruce W.1
    Replies:
    3
    Views:
    2,597
    Bruce W.1
    Feb 1, 2004
  2. mark
    Replies:
    0
    Views:
    332
  3. Jason
    Replies:
    2
    Views:
    1,305
    Jason
    Feb 11, 2005
  4. user
    Replies:
    1
    Views:
    754
    Bruce Barker
    Apr 4, 2005
  5. Andries

    I know, I know, I don't know

    Andries, Apr 23, 2004, in forum: Perl Misc
    Replies:
    3
    Views:
    223
    Gregory Toomey
    Apr 23, 2004
Loading...

Share This Page