why why why does function not work

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top