Import
System.Collections namespace at the top of .cs or .vb page as
Imports System.Collections
Dim lst As New SortedList()
lst.Add("Key1","ValueA")
lst.Add("Key2","ValueB")
Session("SortedList") = lst
'To convert Session again into SortedList,we will write below code:-
Dim sort_lst_obj As SortedList = CType(Session("SortedList"),SortedList)
'To access value from SortedList
Dim str_value1 As String = sort_lst_obj("Key1")
Dim str_value2 As String = sort_lst_obj("Key2")