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

📄 traceisenabled.aspx

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

<Script Runat="Server">

Sub Page_Load
  Dim colArrayList As ArrayList

  colArrayList = New ArrayList()
  colArrayList.Add( "red" )
  colArrayList.Add( "green" )
  colArrayList.Add( "aliceblue" )

  If Trace.IsEnabled Then
    Dim strTraceMessage As String
    Dim strItem As String
    For Each strItem in colArrayList
      strTraceMessage &= strItem & ","
    Next
    Trace.Warn( strTraceMessage )
  End If

  dropColors.DataSource = colArrayList
  dropColors.DataBind
End Sub

</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 + -