Author: SMAS-SMAS | Posted on: 11/21/2008 11:05:42 AM | Views : 310

I am getting here a list of countries  and save it in a Session Variable "COUNTRIES". I want when the address page again and again load, it not get a round trip of database. Is my this approch is correct or not. Please advise

    Public Shared Function GetCountries() As List(Of GetData)
        Dim objConnection As New CConnection

        Dim objCountries As Object = Nothing
        Dim objCountry As Object = Nothing
        Dim arrGetCountries As New List(Of GetData)

        Try

            If HttpContext.Current.Session("COUNTRIES") IsNot Nothing Then
                Return HttpCon ...

Go to the complete details ...