ApplicationState3.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ApplicationState3.aspx.cs" Inherits="ASPNETALL.ApplicationState3" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
.auto-style1 {
width:
100%;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<table class="auto-style1">
<tr>
<td><h1>Application State Form3</h1></td>
</tr>
<tr>
<td>User Name: <asp:TextBox ID="txtName" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>Uesr Email:
<asp:TextBox ID="txtEmail" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Button ID="btnSendData" runat="server" Font-Bold="True" Text="ApplicationState4" OnClick="btnSendData_Click" />
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ApplicationState3.aspx.cs" Inherits="ASPNETALL.ApplicationState3" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
.auto-style1 {
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<table class="auto-style1">
<tr>
<td><h1>Application State Form3</h1></td>
</tr>
<tr>
<td>User Name: <asp:TextBox ID="txtName" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>Uesr Email:
</td>
</tr>
<tr>
<td>
<asp:Button ID="btnSendData" runat="server" Font-Bold="True" Text="ApplicationState4" OnClick="btnSendData_Click" />
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
using System;
public partial class ApplicationState3 : System.Web.UI.Page
{
protected void btnSendData_Click(object sender, EventArgs e)
Application["Name"] = txtName.Text;
}
}
ApplicationState4.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ApplicationState4.aspx.cs" Inherits="ASPNETALL.ApplicationState4" %>
<head runat="server">
<title></title>
<style type="text/css">
.auto-style1 {
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<table class="auto-style1">
<tr>
<td><h1>Application State Form4</h1></td>
</tr>
<tr>
<td>User Name :
</td>
</tr>
<tr>
<td>User Email :
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
using System;
public partial class ApplicationState4 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
if(Application["Name"]!=null)
lblName.Text = Application["Name"].ToString();
if(Application["Email"]!=null)
lblEmail.Text = Application["Email"].ToString();
}
}
}
0 comments
Post a Comment