Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old June 5th, 2004, 04:36 AM
Registered User
 
Join Date: Jun 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default ViewState

I am working with VS.NET 2003 and the web server controls always keep there state even if I disable the enableviewstate property

Is there something I did not understand well?

please help


  #2 (permalink)  
Old June 5th, 2004, 04:40 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

They shouldn't. They don't for me. Can you explain how you determined this?
  #3 (permalink)  
Old June 5th, 2004, 05:09 AM
Registered User
 
Join Date: Jun 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I started a new ASP.NET project, and added three controls to the web page; TaxtBox, DropDownList and a button, then I added three values to the DropDownList (1,2,3) , and set the EnableViewState property for the Textbox, DropDownList and the Page to false.

When I run the project i choose the value 2 in the DropDownList and enter some text in the TextBox, when I receive the result page, all the values are still there, and when I opened the client source I found the __VIEWSTATE hidden field.

So I didn’t understand what is happening

Thanks


  #4 (permalink)  
Old June 5th, 2004, 11:13 PM
Friend of Wrox
Points: 3,558, Level: 25
Points: 3,558, Level: 25 Points: 3,558, Level: 25 Points: 3,558, Level: 25
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: California, USA
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

ASP.NET keeps state when u submit ur page. I mean I guess u put a button to send info or anything... but it'll save data for next view, I mean when u push button, in postback u'll see the last selected values!
And about hidden vales: ASP.NET make many hidden fields for ur project to manage his job. never mind for them.

Always:),
Hovik Melkomian.
  #5 (permalink)  
Old June 6th, 2004, 04:25 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

It is unlikely that the __VIEWSTATE field will dissappear completely. Unless you disable viewstate for the whole page, that field will probably still be there. Granted, if you disable viewstate for all the controls then the contents of the viewstate field should be quite small, but there none the less.


Similar Threads
Thread Thread Starter Forum Replies Last Post
viewstate error balesh.mind ASP.NET 2.0 Professional 1 August 31st, 2007 08:51 PM
ViewState Wervis C# 1 December 3rd, 2005 11:35 AM
Viewstate Wervis BOOK: ASP.NET Website Programming Problem-Design-Solution 0 November 30th, 2005 09:42 AM
ViewState abdul_owiusa General .NET 0 October 18th, 2005 04:37 PM
ViewState and ItemCreated eoghan ASP.NET 1.0 and 1.1 Professional 1 November 29th, 2004 01:06 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.