In one of my ASP website I am facing problem with session variable.
Following is extract of my code.
If Page.IsPostBack = False And newFrmReply = False Then
Dim mystream As IO.Stream
mystream = Request.InputStream()
Dim filebytes(mystream.Length) As Byte
mystream.Read(filebytes, 0, mystream.Length)
For i = 0 To UBound(filebytes)
If filebytes(i) <> 0 Then
reg.poststr = reg.poststr & Chr(filebytes(i))
End If
Next
Session("poststring") = reg.poststr
Else
reg.poststr = Session("poststring")
End If
serial = reg.getvalueFromUrl("Serial", reg.poststr)
If serial > 0 Then
TxtSl_no.Text = Mid(serial, 1, 5)
Else
TxtSl_no.Visible = True
lblSerialNo.Visible = True
End If
Initially Session("poststring") is set from string posted to URL. We have given one ASP button. On button click postback happens.
After postback wherever session is ...
Go to the complete details ...