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

📄 default.aspx

📁 东软内部材料(四)asp等相关的教学案例 
💻 ASPX
字号:
<%@Page Language="C#" %>

<%

SortedList alphabet = new SortedList();

alphabet = CollectionsUtil.CreateCaseInsensitiveSortedList();

alphabet.Add( "Z", "The Letter Z" );
alphabet.Add( "A", "The Letter A" );
alphabet.Add( "S", "The Letter S" );

Response.Write("<h3>A sorted list</h3>");

foreach( DictionaryEntry letter in alphabet )
{
	Response.Write( "<BR>" + letter.Key + " - " + letter.Value);
}

Response.End();

Hashtable names = new Hashtable();

names.Add( "RA", "Richard Anderson" );
names.Add( "DS", "David Sussman" );
names.Add( "RH", "Rob Howard" );
names.Add( "AH", "Alex Homer" );
names.Add( "KW", "Karli Watson" );
names.Add( "BF", "Brian Francis" );


Response.Write("<h3>Unsorted list</h3>");

foreach( DictionaryEntry name in names )
{
	Response.Write( "<BR>" + name.Key + " - " + name.Value);
}


Response.Write("<h3>Sorted list</h3>");

// Create a sorted copy of the list 

SortedList sortedNameList = new SortedList( names );

foreach( DictionaryEntry name in sortedNameList )
{
	Response.Write( "<BR>" + name.Key + " - " + name.Value);
}

// Create a sorted copy of the list 

//foreach( string name in sortedNameList.GetValueList() )
//{
//	Response.Write( "<BR>" + name );
//}


%>

⌨️ 快捷键说明

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