User control and viewstate

Discussion in 'ASP .Net Web Controls' started by Roshawn Dawson, Jan 21, 2005.

  1. Hi,

    Is it possible for a web user control to access the viewstate of the
    host page? If so, how?

    Thanks,
    Roshawn
    Roshawn Dawson, Jan 21, 2005
    #1
    1. Advertising

  2. Roshawn Dawson

    Teemu Keiski Guest

    No, unless page explicitly passes its ViewState collection to the control
    and this doesn't happen by default. Usually page could expose domain
    specific properties with which the UC can do the job e.g access them, pass
    data whatsoever. Optional route is to take it that way that page sets
    something to properties of UC whcih handles the storing to its own ViewState
    collection.

    But start point is that page ahs its own separate ViewState collection as do
    have its controls.

    --
    Teemu Keiski
    MCP, Microsoft MVP (ASP.NET), AspInsider
    ASP.NET Forum Moderator, AspAlliance Columnist
    http://blogs.aspadvice.com/joteke

    "Roshawn Dawson" <> wrote in message
    news:%23pY98v6$...
    > Hi,
    >
    > Is it possible for a web user control to access the viewstate of the host
    > page? If so, how?
    >
    > Thanks,
    > Roshawn
    Teemu Keiski, Jan 27, 2005
    #2
    1. Advertising

  3. Roshawn Dawson

    neerajsaluja Guest

    Then how can we do this. Actaully I also have the similar requirement in
    which I need to object stored in ViewState of the hosting page to the
    user control.

    How actually can we do this ?



    --
    neerajsaluja
    ------------------------------------------------------------------------
    Posted via http://www.mcse.ms
    ------------------------------------------------------------------------
    View this thread: http://www.mcse.ms/message1366773.html
    neerajsaluja, Feb 18, 2005
    #3
    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. Steve Richter
    Replies:
    5
    Views:
    6,416
    Brock Allen
    Apr 5, 2005
  2. Mad Scientist Jr
    Replies:
    0
    Views:
    633
    Mad Scientist Jr
    Mar 22, 2006
  3. Jonathan Wood

    User Control to Control Other User Control

    Jonathan Wood, Jan 24, 2010, in forum: ASP .Net
    Replies:
    4
    Views:
    539
    Jonathan Wood
    Feb 2, 2010
  4. Josema
    Replies:
    2
    Views:
    345
  5. Josema
    Replies:
    0
    Views:
    204
    Josema
    May 9, 2005
Loading...

Share This Page