Viewing source for recipe1808vb.aspx

<%@ Page %>
<%@Import namespace="System.Collections"%>
<script language="vb" runat="server">
Sub Page_Load(sender As Object, e As EventArgs)
	Dim mySortedList As New SortedList(10)
	mySortedList.Add("One", 1)
	mySortedList.Add("Two", 2)
	mySortedList.Add("Three", 3)
	mySortedList.Add("Four", 4)
	mySortedList.Add("Five", 5)
	mySortedList.Add("Six", 6)
	mySortedList.Add("Seven", 7)

	' alternate syntax
	mySortedList("Eight") = 8

	mySortedList.Add("Nine", 9)
	mySortedList.Add("Ten", 10)
	Dim d As DictionaryEntry
	
	' Note that results are sorted by Key, not Value
	For Each d In mySortedList
		Response.Write("Key: " & d.Key & " Value: " & d.Value & "<br>")
	Next
End Sub
</script>
<HTML>
	<body>
		<form id="form1" method="post" runat="server">
		</form>
	</body>
</HTML>