possible to remove Viewstate hidden field?

Discussion in 'ASP .Net' started by Stimp, Sep 10, 2006.

  1. Stimp

    Stimp Guest

    Is it possible to prevent the <input type="hidden"
    name="__VIEWSTATE"> field from being generated in an aspx page?

    I'm running off Framework 1.1

    The field is messing up a process that I need to run, so simply clearing
    out the viewstate by overriding SavePageStateToPersistenceMedium, etc
    isn't enough

    Thanks in advance!
    --

    fiddlewidawiddum
    Stimp, Sep 10, 2006
    #1
    1. Advertising

  2. Stimp

    Scott M. Guest

    You can disable it at the page level (via the properties window or the page
    directives line in the .aspx file), but that won't completely get rid of the
    field. A minimum viewstate field will always be present. It should,
    however, prevent the load and save viewstate methods from running.


    "Stimp" <> wrote in message
    news:...
    > Is it possible to prevent the <input type="hidden"
    > name="__VIEWSTATE"> field from being generated in an aspx page?
    >
    > I'm running off Framework 1.1
    >
    > The field is messing up a process that I need to run, so simply clearing
    > out the viewstate by overriding SavePageStateToPersistenceMedium, etc
    > isn't enough
    >
    > Thanks in advance!
    > --
    >
    > fiddlewidawiddum
    Scott M., Sep 10, 2006
    #2
    1. Advertising

  3. Stimp

    Stimp Guest

    On Sun, 10 Sep 2006 Scott M. <> wrote:
    > You can disable it at the page level (via the properties window or the page
    > directives line in the .aspx file), but that won't completely get rid of the
    > field. A minimum viewstate field will always be present. It should,
    > however, prevent the load and save viewstate methods from running.


    I read on the net that it's possible to prevent the <input> field being
    generated by not inheriting from the 'Page' class .. but it neglects to
    mention what I should inherit from instead.

    Any ideas?

    cheers
    --

    fiddlewidawiddum
    Stimp, Sep 10, 2006
    #3
  4. Stimp

    Scott M. Guest

    Well, if you don't inherit from the page class, you are going to lose
    virtually all the other benefits and characteristics of a Web Form.
    ViewState is part of the fundamental architecture of ASP.NET. If you
    absolutely can't make your application work because of it, ASP.NET may not
    be the platform for you.


    "Stimp" <> wrote in message
    news:...
    > On Sun, 10 Sep 2006 Scott M. <> wrote:
    >> You can disable it at the page level (via the properties window or the
    >> page
    >> directives line in the .aspx file), but that won't completely get rid of
    >> the
    >> field. A minimum viewstate field will always be present. It should,
    >> however, prevent the load and save viewstate methods from running.

    >
    > I read on the net that it's possible to prevent the <input> field being
    > generated by not inheriting from the 'Page' class .. but it neglects to
    > mention what I should inherit from instead.
    >
    > Any ideas?
    >
    > cheers
    > --
    >
    > fiddlewidawiddum
    Scott M., Sep 10, 2006
    #4
    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. Alan Silver
    Replies:
    12
    Views:
    8,697
    Alan Silver
    Jun 30, 2005
  2. Umut Tezduyar
    Replies:
    4
    Views:
    3,309
    Ravi Ambros Wallau
    Feb 15, 2006
  3. Rick
    Replies:
    3
    Views:
    8,092
    Alexey Smirnov
    Apr 13, 2010
  4. Jeff
    Replies:
    5
    Views:
    1,174
  5. GavMc
    Replies:
    4
    Views:
    311
    Evertjan.
    Sep 22, 2005
Loading...

Share This Page