Click here to Skip to main content
15,892,072 members
Articles / Web Development / ASP.NET

Beginners Introduction to State Management Techniques in ASP.NET

Rate me:
Please Sign up or sign in to vote.
4.84/5 (123 votes)
23 Dec 2008CPOL23 min read 397.2K   3.4K   286  
This article discusses the state management techniques used in ASP.NET. We discuss: QueryString, Cookie, Session, Profile, Static Variables and Application state.
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!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>
        <table>
            <tr>
                <td>Person id:</td>
                <td><asp:TextBox runat="server" ID="txtPersonId"></asp:TextBox></td>
            </tr>
            <tr>
                <td>Name:</td>
                <td><asp:TextBox runat="server" ID="txtName"></asp:TextBox></td>
            </tr>
            <tr>
                <td>Age:</td>
                <td><asp:TextBox runat="server" ID="txtAge"></asp:TextBox></td>
            </tr>
        </table>
        <asp:Button ID="btnSave" runat="server" onclick="btnSave_Click" 
            Text="Store person details" />
    
    </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)


Written By
Software Developer ThoughtWorks
India India
Call me Navaneeth Some years ago--never mind how long precisely, I was doing programs with C and C++. When .NET came, I started with C#,ASP.NET and SQL Server.

Comments and Discussions