Click here to Skip to main content
11,578,739 members (67,034 online)
Click here to Skip to main content
Articles » Web Development » ASP.NET » General » Downloads
Add your own
alternative version

State Management in ASP.NET - Introduction

, 20 Jan 2014 CPOL 264.3K 2.5K 65
An overview of state management techniques in ASP.NET.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="sessionApplicationDemo.aspx.cs" Inherits="sessionDemo" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
        <br />
        <br />
        No of postback from starting to application &nbsp;(saved in Application) :
        <asp:Label ID="Label1" runat="server" ></asp:Label><br />
        No of postback (saved in Session) :<asp:Label ID="Label2" runat="server" ></asp:Label><br />
        Total No of Click on "Redirect to same Page" button (Saved in QueryString ):
        <asp:Label ID="Label3" runat="server" ></asp:Label><br />
        <br />
        <br />
        <asp:Button ID="Button2" runat="server" Text="Redirect to same Page" OnClick="Button2_Click" /></div>
    </form>
</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Sachin Gargava
Software Developer
India India
He has done Master Degree in Computer Application (MCA) and currently working as a S/W Developer and having more than 4+ years exp. He has worked with all the .NET framework and good exposure in Web and Windows based development using Microsoft Technology.

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.150603.1 | Last Updated 20 Jan 2014
Article Copyright 2012 by Sachin Gargava
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid