why why why does function not work

  • Thread starter Thread starter Horace Nunley
  • Start date Start date
H

Horace Nunley

I'm expecting this function to return the same value each time the page is
hit within the same session:
In other words i want to save the guid as a session variable

Function TempImageGUID() As String

Dim _Temp As String

If Not (Session("TempGUID") Is Nothing) Then

_Temp = Session("TempGUID")

Else

Session("TempGUID") = System.Guid.NewGuid().ToString()

_Temp = Session("TempGUID")

End If


Return _Temp

End Function
 
The only reason I can see why it would not "work" is that the second code
block after the "Else" is the only one that's ever being executed.
Peter
 
Back
Top