Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. disable viewstate in query string

disable viewstate in query string

Scheduled Pinned Locked Moved ASP.NET
databasetutorialquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Russell Jones
    wrote on last edited by
    #1

    I've written a page that allows a user to look up a page of info from a DB. Nothing too ground breaking there. Now i want to allow the user to email a URL including a querystring specifying which page he was looking at. The querystring contains a massive __ViewState parameter which I can't get rid of. I've set enableviewstate and enableSession state to false in the Page tag and I've set the enableviewstate attribute to false in all the controls i could find that had it set to true but I still haven't got rid of it. My application is going to be entirely stateless so i'm happy to just pass an occassional piece of data from one page to another. Does anyone know how to turn off viewstateentirely? Is there a config setting? Thanks Russell

    K M 2 Replies Last reply
    0
    • R Russell Jones

      I've written a page that allows a user to look up a page of info from a DB. Nothing too ground breaking there. Now i want to allow the user to email a URL including a querystring specifying which page he was looking at. The querystring contains a massive __ViewState parameter which I can't get rid of. I've set enableviewstate and enableSession state to false in the Page tag and I've set the enableviewstate attribute to false in all the controls i could find that had it set to true but I still haven't got rid of it. My application is going to be entirely stateless so i'm happy to just pass an occassional piece of data from one page to another. Does anyone know how to turn off viewstateentirely? Is there a config setting? Thanks Russell

      K Offline
      K Offline
      kubben
      wrote on last edited by
      #2

      I am pretty sure the only time viewstate ends up in the query string is when you go cookieless in your webconfig. So if you change your site to allow cookies then the viewstate should get out of your query string. Note even when you turn off viewstate, there is still some viewstate info in the page. Anyway, that is my best guess. Ben

      1 Reply Last reply
      0
      • R Russell Jones

        I've written a page that allows a user to look up a page of info from a DB. Nothing too ground breaking there. Now i want to allow the user to email a URL including a querystring specifying which page he was looking at. The querystring contains a massive __ViewState parameter which I can't get rid of. I've set enableviewstate and enableSession state to false in the Page tag and I've set the enableviewstate attribute to false in all the controls i could find that had it set to true but I still haven't got rid of it. My application is going to be entirely stateless so i'm happy to just pass an occassional piece of data from one page to another. Does anyone know how to turn off viewstateentirely? Is there a config setting? Thanks Russell

        M Offline
        M Offline
        Mack Ait Aoudia
        wrote on last edited by
        #3

        try to use the page directive EnableViewState="false". It should disable the viewstate for the entire page!

        Just Relax And Keep It Simple.

        R 1 Reply Last reply
        0
        • M Mack Ait Aoudia

          try to use the page directive EnableViewState="false". It should disable the viewstate for the entire page!

          Just Relax And Keep It Simple.

          R Offline
          R Offline
          Russell Jones
          wrote on last edited by
          #4

          I,also, assumed that would turn it off for everything on the page but it didn't seem to. Russell

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups