<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SessionExample1.aspx.cs" Inherits="StateManagement.SessionExample1" %>

 

<!DOCTYPE html>

 

<html xmlns="http://www.w3.org/1999/xhtml">

<head id="Head1" runat="server">

    <title>Session State Example</title>

</head>

<body bgcolor="#9999ff">

   

    <h3>This Session Example demonstrates maintaining the number of times a button

 was clicked using a Session variable.<br />

        This also example demonstrates a multi-page web application.</h3>

 

 

    <form id="form1" runat="server">

       

        <asp:Label ID="lblDisplay" runat="server" Font-Bold="True"

Text="Click the button..." style="z-index: 1; left: 10px; top: 94px;

position: absolute"></asp:Label>

 

        <asp:Label ID="Label1" runat="server" Text="Enter your name:"

            style="z-index: 1; left: 15px; top: 120px; position: absolute"></asp:Label>

               

        <asp:TextBox ID="txtName" runat="server"  Width="130px"

            style="z-index: 1; top: 124px; position: absolute;

left: 129px;"></asp:TextBox>

                  

        <asp:Button ID="btnVote" runat="server" Text="Vote" Width="130px"

            style="z-index: 1; left: 130px; top: 162px; position: absolute"

     OnClick="btnVote_Click" />

  

        <asp:Button ID="btnViewResults" runat="server" Text="View Results" Width="130px"

            style="z-index: 5; left: 283px; top: 162px; position: absolute"

     OnClick="btnViewResults_Click" />

 

    </form>

 

</body>

</html>