In many of our business ASPX applications, there is a need for special UserControls that perform specific functionalities so that they can be easily re-used in the entire application. There are two ways we can use a UserControl: either we drag it onto the form, or we load it dynamically through the use of [...]
One disadvantage of the ViewSate is it adds extra kilobytes of data to the payload. To overcome this disadvantage, it can be saved on the server.Strategy
There are three options to save the ViewState on the server.MS SQL Server File System Memory
Using MS SQL Server is expensive. If you do not have MS SQL Server, you [...]
While building a web project, we may often come across the situation of displaying records or other types of data. We can do it in the best way by using DataGrid/GridView. It’s very simple and requires only a knowledge of C#, of web application building and of SQL 2005.
“A picture is worth 1000 words!!” so I have explained a [...]
When dynamically adding controls to an ASP.NET page in runtime the object references are lost at postback because they have no handle in the codebehind. The values entered by the user is not availible when accessing these objects after postback, and they seem empty. This article describes how to use ViewState to recreate and [...]
PostSharp4ViewState is a plug-in for the PostSharp[^] AOP framework by Gael Fraiteur. Its goal is to simplify state management in ASP.NET pages and controls using a declarative programming concept.How do I use it?
Whenever you want to store some value between postbacks, you decorate it with an attribute – namely PersistAttribute. You can store both property and [...]