When to use/not use ViewState

I'm creating a client app and I'm wondering is it neccessary to  enable viewstate for "All" the fields.  When should you use viewstate and when should you "NOT" use viewstate.

Thanks.
Daniel
0
dbogey
5/20/2004 1:03:00 PM
asp.net.getting-started 91979 articles. 4 followers. Follow

1 Replies
1907 Views

Similar Articles

[PageSpeed] 29

It depends on your requirements.

if you dont need to preserve the contents of inputboxes past the initial post then dont turn on viewstate for them.
you could take the approach of turning off viewstate for everything, and then turn it back on item by item as you find you need it. It shouldnt just be enabled for everything as it does make the page heavier - especially with datagrids etc...

Mike Banavige
~~~~~~~~~~~~

Need a site code sample in a different language? Try converting it with: http://converter.telerik.com/
0
mbanavige
5/20/2004 2:41:55 PM
Reply:

Similar Artilces:

How to use net use?
Please can any one tell me how to use the dos command net use properly? I have read the help but can't seem to get it to work. Keep getting sytax error message. Thanks in advance. "Beowulf" <who-knows@no-one.com> wrote in message news:9krutk$puu$1@news.grc.com... > Please can any one tell me how to use the dos command net use properly? > > I have read the help but can't seem to get it to work. Keep getting sytax > error message. what are you trying to do? There are about 50 options to "net use" that do a ton of different thin...

How to get new web app to use .NET 2.0 on Win2K server using .NET 1.1 as default framework?
I have .net framework1.1 and 2.0 on our server running win2K. i have existing applications that uses asp.net 1.1, i also have a new app that use ASP.net 2.0.  how can i set my new .NET 2.0 app to point to asp.net 2.0 without messing up my existing .NET 1.1 apps? To specify the ASP .Net version fro a web application, do the followingIn IIS Manager select the web application -> Properties -> ASP.Net TabSelect  ASP.Net version you want to use for the applicationRegards,PrashantDont forget to click "Mark as Answer" on the post that helped you. But I am running Win2K...

Using Using
I have just completed reading a chapter in my book on performance. The books says to speed up performance on your web site you should use the using statement when opening connections. My question is how do you catch errors if you are using this as apposed to a try catch block.thanksBryan  Why would you use it as an alternative to a try/catch statement. Couldn't you just do something like  public void UsingSomeMethod() { try { SomeMethod(); } catch(SomeException e) { /// do something useful }}public void SomeMethod() { using (Something) { ...

Sending SMS using vb.net or C#.net using vb.net or c#.net
Hi  My requirement is I hav one csv file with these fields id,mobilenum,messgae,status.intiallu staus is 0. once i read the all fileds and take that mobile number.using tat mobile number  i need to send sms .after sending sms i shuld change status as 1 How to send sms thru coding (please dont provide any links.if it is provide also please give working links becox i checked codeproject .i didnt get any nice link. and also provide the how to update the status field im csv file   Thank ssandhya   To send SMS, you need some third party SMS providers. if you consul...

When to use ( and when to use ((?
I'm just not getting it. When do you use ( in a statement, when do you need to use ((, and is the space after either or both mandatory? For example, I coded this statement: if (( $_ eq $bad_guys_ip )) { more_stuff_here }; Why the two (( in an if? And why does it seem to not work when I miss the space after the ((? Thanx! Mark me as... /Corn-fused|Dense/ > I'm just not getting it. >=20 > When do you use ( in a statement, when do you need to use ((, and is > the space after either or both mandatory? >=20 > For example, I coded this sta...

How to use the arguments to use() in the package being used
Howdy,=20 The subject says it all believe it or not :) What I'm trying to figure out is how to pass an argument=20 (pragma I believe is the proper term) to use() and do=20 sonethign in the package based on it. I've looked at CGI.pm source but can't seem to track it down.=20 (Similar idea as to CGIs -oldstyle_urls -newstyel_urls) http://search.cpan.org/~lds/CGI.pm-3.04/CGI.pm#PRAGMAS What I'd like to do is something like this: # for old time's sake we'll just use our favorite module use Foo::Monkey qw(:Foo :Bar -doamazingthings); #then in Foo::Monkey...

To use caching or to use ViewState object
I have some data in the database that I dont want to load on every page load event. So I am using Caching for this purpose my code looks something like this: private void Page_Load(object sender, System.EventArgs e)         {             // Cache the data so that we dont have to access the database on each page load.                         if(Cache["Events"] == null)          &nb...

Using jQuery
What are the advantages of using ScriptReference to include a jQuery source in my .NET pages as opposed to using the regular <script src='jquery.js'></script> method? Thanks.Ryan One advantage of the ScriptManager is that you can use application relative paths (e.g. ~/scripts/jquery.js).On a related note, if you're writing something that will be public facing, you might consider using Google's free CDN hosted version of jQuery. Encosia - ASP.NET, AJAX, and more.Latest article: How I handle JSON dates returned by ASP.NET AJAX  Thanks for the reply. I act...

Using Dot Net Nuke to maintain a site developed in VS.NET using C#
Hi,Does anyone know if there is a way to create a site using C# and Visual Studio.NET 2003, but then use Dot Net Nuke to allow non-technical users to add content to the site.  The current state of the site must be accessible in both VS.NET and DNN regardless of which application saved it last.  Also preferably I would like the language used to remain C# even when edited by the marketing staff, so that I can still maintain it myself using VS.NET.  Hope you understand what I mean. If this is not possible, I wonder if anyone knows what solution I am after.   Thanks in adv...

How to use HTTP protocol in .Net Remoting? Thanks and Regards,How to use Http protocol in .net Remoting
<>Hi,     <><>How to use HTTP protocol in .Net Remoting ? Is there any specific code bits requires for that ?    I am using TCP protocol it's working but when i change it to  HTTP it throwing an error like "Arugument null exception"<>  Could  anybody give samples for that? Thanks & Regards,Vijay Here is an example of HTTP remoting:http://msdn2.microsoft.com/en-us/library/system.runtime.remoting.channels.http.httpchannel.aspxCheers,       Kev...

Use of Net Use command to map a drive
--____ETNOBHIDCKMBHAFMGEBY____ Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; modification-date="Sat, 28 Mar 2008 13:05:52 +0000" I'm trying to find the correct syntax to enable the mapping of a netware = drive from a batch file. We are trying to use a backup utility that logs = into a Windows XP machine remotely, maps the netware drives then backs up = the mapped drives. Finaly it will delete the maps and logout. Has anyone any experience of exactly using the net use command to map a = drive...

Using .NET assembly through COM using cominterop
I have a .NET assembly that I call through COM in a classic ASP application using Cominterop.  It used to work fine, however, it's been some time and I've had to make a change and recompile it.  Unfortunately for me, I can't remember how I registered the thing to tell COM how to instantiate it, i.e running regsvr32 and passing the dll returns and error.  I have a .tlb file but I can't remember if I can use that to register the dll??  Hey it's been one busy couple of months!Need help. You could try PInvoke(platform Invoke) solution in this post.  Hope this help...

why to use 1)use CGI,2)use Strict ,3)use Carp in script
hi why we r using 1)use CGI, 2)use Strict, 3)use Carp in the begining of script sometimes. What is the use of it.Is the files CGI.pm,Strict.pm,Carp.pm default with PERL. Thnx __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com On Thu, 2004-11-04 at 09:31, supriya devburman wrote: > hi Hi > why we r using > 1)use CGI, We only use CGI when we want to use methods from that module (usually on web pages); see `perldoc CGI` for more information on what you...

Using a REST API using "Astoria" (with .NET Framework 3.5 and VS.NET 2008 SP1)
Hello! I'm really interested in learning how to work with the new .NET Framework 3.5 and VS.NET 2008 SP1 (still beta). Here is my question: I would like to use a REST API that is not made by me. I'm talking about the REST API of Community Server 2008 (www.communityserver.org). I've got the full specification of the API. They have it well documented and ready to go. It appears to be very easy to use, but... HOW? How to connect the web services with the new .NET 3.5 properly? The full specification can be read here: http://api.communityserver.org. I've successully used...

Web resources about - When to use/not use ViewState - asp.net.getting-started

Viewing ASP.NET viewstate with ViewState Decoder - testingReflections.com
Tamper-Proofing A hashcode will not secure the actual data within the ViewState field, but it will greatly reduce the likelihood of someone ...

Binary-to-text encoding - Wikipedia, the free encyclopedia
The ASCII text-encoding standard uses 128 unique values (0–127) to represent the alphabetic, numeric, and punctuation characters commonly used ...

Support • FileSeek • Binary Fortress Software
FileSeek: Lightning Fast File Search!

Funny contents index page
A2Zmenu.Com Blog Tutorials Online Exam Ask Question Utility Fun @ Work Funda Contact Us About Us Loading Topic All Category Appraisal FunnyImages ...

Languages -> C# Articles, Tutorials, Examples: ASP Alliance
.NET,ASP,ASP.NET,SQL,XML,HTML,ADO,ADO.NET,JavaScript,JScript,CSharp,VBScript and VB tutorials from AspAlliance.

Blog Archive
Blog Archive 2013 75 Essential Tools for iOS Developers Aug 15 2013 posted in iOS Speaking at Cocoa Conf PDX Jul 13 2013 posted in Speaking In ...

iTunes Sync Tested MP3 Players - Binary Fortress Software
Home • Support Binary Fortress Software The people that give you all of these great applications, and more! DisplayFusion Multi-monitor taskbar, ...

LAMP & Microsoft Stacks - SMX Sydney - David Cropley
... is a great place to start with people using IIS, it will allow you to get a better understanding of your site from an SEO perspective Use viewstates ...

Latest Updates
Latest Updates - Free source code and tutorials for Software developers and Architects.; Updated: 15 Feb 2013

The Antidote to ASP.NET Smart Navigation
One of the issues I have with ASP.NET is that it is postback crazy . Virtually nothing of significance can be done in pure browser client code ...

Resources last updated: 1/2/2016 4:37:10 PM