Access ViewState From ClassFile
teHello Friends Manytime we need to use ViewState while working 3-tier Architecture but its difficult to use it. here i have made a sample to use Viewstate from Classfile ViewState: Viewstate is an object of Class StateBag Here is sample of Viewstate in Class file in this example we will add names from Textbox to gridview using Viewstate. so in code behind <div> Name : <asp:TextBox ID="txtName" runat="server"></asp:TextBox><asp:Button ID="btnAdd" runat="server" Text="Add" /> </div> <div> <asp:GridView ID="grvNames" runat="server" AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" GridLines="None"> <RowStyle BackColor="#F7F6F3" ForeColor="#333333" /> <Columns> ...