ViewState vs Cache

By Muhammad Adnan Rafiq

ViewState: Viewstate is a gift for .net developers, which solves lot of problem of remembering what was in that field last time user hit submit, and storing values to get after postback, but viewstate purely belongs to page postback.If used wisely then a great advantages.But if used accessively then it can heart your application badly that users may be waitng for minutes if you are putting everything in viewstate like big objects collection, datatables,dataset, it should only be used to store variables values.

Cache:yet another gife of .net, servers great if you find a suitable candiate for caching in you system by analyzing your database, the entities which dont get updated randomly are the best candidates for cache.your pages will come in fly.ASP.net provides different types of caching..will explain later…..

Tags: , ,

Leave a Reply