473,946 Members | 5,725 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Viewstate overhead ?

Is there any overhead associated with having viewstate enabled but nothing is
being stored in the viewstate? I have an aspx page that uses regular HTML,
i.e. <input type=submit value=submit>, and viewstate is enabled in the
web.config file of my application. Just curious if this would cause any
unnecessary processing between post backs to the web server.

Thanks,

Natalie
Jul 21 '05 #1
1 1377
It is a good idea to disable viewstate for pages that don't need it.

- Sahil Malik
You can reach me thru my blog http://www.dotnetjunkies.com/weblog/sahilmalik
"natty" <na***@discussi ons.microsoft.c om> wrote in message
news:77******** *************** ***********@mic rosoft.com...
Is there any overhead associated with having viewstate enabled but nothing
is
being stored in the viewstate? I have an aspx page that uses regular
HTML,
i.e. <input type=submit value=submit>, and viewstate is enabled in the
web.config file of my application. Just curious if this would cause any
unnecessary processing between post backs to the web server.

Thanks,

Natalie

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1499
by: Bigal | last post by:
If I want to create a ListBox filled by a database query, it is not recommended to enable the viewstate of the form, because it does not make sense to reconstruct the whole and costs performance. But what if I want to react on the onChange event, I do have to set autoRepost to true to get my selectedItem. It seems I need the viewstate to retrieve my selection. What is the best practice to do this: - fill list by database query
3
2097
by: jenn | last post by:
Hi I was using Sessionto persist datatables, but now I don't think it's good idea to do so as Session can cause overhead on the server (as the number of users grow), so I use ViewState to store the datatables instead. I'm wondering what are the disadvantages of using ViewState against Session, beside the fact that the former slows the rendering of HTML as well as the data is visible to the user Are there other issues I should be...
2
1165
by: Gandalf | last post by:
Say I have persisted a DataSet in the ViewState of a page, and that when the page is posted back I make several references to that dataset like so: DataSet MyDataSet = (DataSet)ViewState; //C# Does this have to deserialize the dataset every time it is referenced... or is it only done once when the page is posted back? I'm just wondering if I should assign the DataSet to a local variable in the PageLoad method or if it's OK to...
5
2673
by: Steven Licciardi | last post by:
I have an aspx page with nothing in it but one literal, which I populate with straight forward html (the html consists of about 25 tables with approx. 30 rows each and two columns with text in each cell). When I click to view the aspx page it takes longer than I would have thought for me to recieve the page. On looking at the source the <input type="hidden" name="__VIEWSTATE" value=jkasdkahsj....> is there but the value is vast in size,...
10
1827
by: Steve Richter | last post by:
I have some potentially large objects I would like to store in the viewstate of a user control. Large as in an entire email message. Is ViewState not the sort of place to store such an object? I think my question and concern depends on what asp.net does with the view state when the page is written to the browser. Is the entire viewstate contents written to the browser as a hidden field? Or are the view state contents stored on the...
1
313
by: natty | last post by:
Is there any overhead associated with having viewstate enabled but nothing is being stored in the viewstate? I have an aspx page that uses regular HTML, i.e. <input type=submit value=submit>, and viewstate is enabled in the web.config file of my application. Just curious if this would cause any unnecessary processing between post backs to the web server. Thanks, Natalie
3
2710
by: emde | last post by:
In looking for a way to trim down viewstate, I came across the following articles to store viewstate in session: http://aspalliance.com/72 http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/PgStPrst.asp It appears as if the first link is actually better as it allows for a "history" of viewstates to be availabale.
5
1421
by: AlexC | last post by:
Hi, i have just read some threads about viewstate and wanted to test myself. But there must be something i don't undertstand, because when i submit the form with EnableViewState="false", i get the values back. It seems that EnableViewState="false" has no influence because 'false' or 'true', it does not make any difference. I thought that with 'false', i wouldn't get the values back. Please look at the code here:
2
6371
by: jwnews1231 | last post by:
Hi, I've been working on minimizing the use of the ViewState in my asp.net applications because of its overhead. The problem I am having is that I keep losing SelectedIndex in the DropDownLists. I don't lose the SelectedIndex when the ViewState is enabled, only when it is off. I have a dropdownlist named countryCbo inside of a UserControl and countryCbo's EnableViewState property is false. In the OnInit() method of the UserCountry...
0
9980
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11557
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
11151
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10685
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9884
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8247
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7412
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6111
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
3538
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.