⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 traceisenabled.aspx

📁 asp.net技术内幕的书配源码
💻 ASPX
字号:
<%@ Page Language="C#" Trace="True" %>

<script language="C#" runat=server>

void Page_Load(Object sender , EventArgs e) 
{
	ArrayList colArrayList;
	string  strTraceMessage= "";

	colArrayList = new ArrayList();
	colArrayList.Add( "red" );
	colArrayList.Add( "green" );
	colArrayList.Add( "aliceblue" );

	if ( Trace.IsEnabled )
	{
	     
		foreach ( string strItem in colArrayList)
			strTraceMessage += strItem + ",".ToString();
	    
		Trace.Warn(strTraceMessage);
	}

	dropColors.DataSource = colArrayList;
	dropColors.DataBind();
}

</Script>

<html>
<head><title>TraceIsEnabled.aspx</title></html>
<body>

<form Runat="Server">

<h2>Enter your Favorite Color</h2>

<b>Favorite Color:<b>
<asp:DropDownList
  ID="dropColors"
  Runat="Server" />

</form>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -