做爰高潮a片〈毛片〉,尤物av天堂一区二区在线观看,一本久久A久久精品VR综合,添女人荫蒂全部过程av

最新文章專題視頻專題問答1問答10問答100問答1000問答2000關鍵字專題1關鍵字專題50關鍵字專題500關鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關鍵字專題關鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
當前位置: 首頁 - 科技 - 知識百科 - 正文

ASP.NET內置對象之Application對象

來源:懂視網 責編:小采 時間:2020-11-27 22:44:56
文檔

ASP.NET內置對象之Application對象

ASP.NET內置對象之Application對象:新建一個網站,包括兩個網頁,代碼如下: 1、Index.aspx代碼: 代碼如下:<%@ Page Language=C# AutoEventWireup=true CodeFile=Index.aspx.cs Inherits=Index %> <!DOCTYPE html PUBLIC -
推薦度:
導讀ASP.NET內置對象之Application對象:新建一個網站,包括兩個網頁,代碼如下: 1、Index.aspx代碼: 代碼如下:<%@ Page Language=C# AutoEventWireup=true CodeFile=Index.aspx.cs Inherits=Index %> <!DOCTYPE html PUBLIC -

新建一個網站,包括兩個網頁,代碼如下:
1、Index.aspx代碼: 
代碼如下:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Index.aspx.cs" Inherits="Index" %>
<!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>無標題頁</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<table style="width: 300px; height: 100px">
<tr>
<td style="width: 100px">
用戶名:</td>
<td style="width: 246px">
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td style="width: 100px">
密    碼:</td>
<td style="width: 246px">
<asp:TextBox ID="TextBox2" runat="server" TextMode="Password"></asp:TextBox></td>
</tr>
<tr>
<td style="text-align: center;" colspan="2">
<asp:Button ID="Button1" runat="server" Text="登錄" OnClick="Button1_Click" /></td>
</tr>
</table>
</div>
</form>
</body>
</html>

Index.aspx.cs代碼: 
代碼如下:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class Index : System.Web.UI.Page
{
string strInfo;
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
Application["Info"] = TextBox1.Text;
strInfo = Application["Info"].ToString();
if (TextBox1.Text == "admin" && TextBox2.Text == "admin")
{
Session["name"] = TextBox1.Text;
Response.Redirect("Default.aspx?Info=" + strInfo + "");//地址欄的傳值
}
}
}
2、Default.aspx代碼:
<%@ 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>無標題頁</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<table style="width: 500px; height: 323px">
<tr>
<td colspan="2">
<asp:TextBox ID="TextBox2" runat="server" Height="314px" Width="497px" TextMode="MultiLine"></asp:TextBox></td>
</tr>
<tr>
<td>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
<asp:TextBox ID="TextBox1" runat="server" Width="390px"></asp:TextBox></td>
<td>
 
<asp:Button ID="Button2" runat="server" Text="發送" OnClick="Button2_Click" /></td>
</tr>
</table>
</div>
</form>
</body>
</html>
Default.aspx.cs代碼:
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Label1.Text = Session["name"].ToString();
/*對象的增加
Application.Add("App1", "Value1");
Application.Add("App2", "Value2");
Application.Add("App3", "Value3");
Response.Write("Application對象的使用");
Response.Write("<br>");
for (int i = 0; i < Application.Count; i++)
{
Response.Write("變量名:" + Application.GetKey(i));
Response.Write(",值:" + Application[i] + "<p>");
Response.Write("<br>");
}*/
}
protected void Button2_Click(object sender, EventArgs e)
{
Application["content"] = TextBox1.Text;
TextBox2.Text = TextBox2.Text + "\n" + Label1.Text + "說:" + Application["content"].ToString();
}
}

聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

文檔

ASP.NET內置對象之Application對象

ASP.NET內置對象之Application對象:新建一個網站,包括兩個網頁,代碼如下: 1、Index.aspx代碼: 代碼如下:<%@ Page Language=C# AutoEventWireup=true CodeFile=Index.aspx.cs Inherits=Index %> <!DOCTYPE html PUBLIC -
推薦度:
標簽: application asp ASP.NET
  • 熱門焦點

最新推薦

猜你喜歡

熱門推薦

專題
Top
主站蜘蛛池模板: 防城港市| 元阳县| 上思县| 宿迁市| 松滋市| 海盐县| 庆阳市| 清远市| 阳城县| 芷江| 东兰县| 乐亭县| 大同市| 邵阳县| 格尔木市| 萍乡市| 子长县| 仁怀市| 巴里| 龙门县| 通山县| 清镇市| 河北区| 梁山县| 桦川县| 余姚市| 白玉县| 独山县| 武山县| 福安市| 旺苍县| 连州市| 渝中区| 鄯善县| 聊城市| 临沭县| 鱼台县| 竹山县| 南康市| 二手房| 高尔夫|