Karl Seguin wrote:
Please provide some examples :)
Karl
Here you are:
Here's where it gets set in the default.aspx.vb section
sCalendar = sCalendar.Repla ce(":", ".")
Session("Calend ar") = objReader.GetDa teTime(4).ToStr ing
Session("ViewPr odHierSKUStatus ") = objReader.GetSt ring(8)
Session("ViewOl dSys") = objReader.GetSt ring(9)
Session("Permis sion") = objReader.GetSt ring(10)
Response.Cookie s("availability rptlevel").Valu e =
objReader.GetSt ring(11)
---> Session("availa bilityrptlevel" ) = objReader.GetSt ring(11)
TransactionLog( "")
Server.Transfer ("sales/newmenu.aspx?Us er=" &
objReader.GetSt ring(2) & "&Name=" & objReader.GetSt ring(3) & "&Sales=" &
sSales & "&Calendar= " & sCalendar & "&P=" & objReader.GetSt ring(6) &
"&Pass=" & objReader.GetSt ring(1) & "&Act=" & objReader.GetSt ring(7) &
"&SKUStat=" & Session("ViewPr odHierSKUStatus ") & "&Oldsys=" &
Session("ViewOl dSys") & "&Permissio n=" & Session("Permis sion"))
Here is the page load piece
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
If Request.QuerySt ring("User") = "" Then
lblUser.Text = Session("UserNa me")
End If
If Session("Sales" ) = "" Then
Session("Permis sion") = Request.QuerySt ring("P")
Session("Pass") = Request.QuerySt ring("Pass")
Session("UserNa me") = Request.QuerySt ring("Name")
Session("ActUse r") = Request.QuerySt ring("Act")
Session("User") = Request.QuerySt ring("User")
Session("Sales" ) = Request.QuerySt ring("Sales")
Session("Calend ar") = Request.QuerySt ring("Calendar" )
Session("Sales" ) = Session("Sales" ).replace("-", "/")
Session("Sales" ) = Session("Sales" ).replace(".", ":")
Session("Calend ar") = Session("Calend ar").replace( "-", "/")
Session("Calend ar") = Session("Calend ar").replace(". ", ":")
Session("ViewPr odHierSKUStatus ") =
Request.QuerySt ring("SKUStat")
Session("ViewOl dSys") = Request.QuerySt ring("Oldsys")
End If
If Session("UserNa me") = "" Then
Server.Transfer ("../Default.aspx")
End If
Session("ActUse r") = UCase(Session(" ActUser"))
Dim xxyz As String
--> xxyz = Session("availa bilityrptlevel" )
the above setting it equal to a string is just some test code I put in
to make sure it was getting set in this code, and was picking up the
right info in it.
When it get set = to "04" in the first part of the code (at the
objreader.getst ring), it is set, and then gets passed into newmenu.aspx.
When it hits newmenu.aspx, it runs thru this code twice (below the xxyz
is just some stuff it does with which menu items show up for which
users). When the page loads, it is still set to "04". However, when I
click on the menu item, it hits page load again, and it sets the session
variable = to nothing.