Karl said:
Please provide some examples
Karl
Here you are:
Here's where it gets set in the default.aspx.vb section
sCalendar = sCalendar.Replace(":", ".")
Session("Calendar") = objReader.GetDateTime(4).ToString
Session("ViewProdHierSKUStatus") = objReader.GetString(8)
Session("ViewOldSys") = objReader.GetString(9)
Session("Permission") = objReader.GetString(10)
Response.Cookies("availabilityrptlevel").Value =
objReader.GetString(11)
---> Session("availabilityrptlevel") = objReader.GetString(11)
TransactionLog("")
Server.Transfer("sales/newmenu.aspx?User=" &
objReader.GetString(2) & "&Name=" & objReader.GetString(3) & "&Sales=" &
sSales & "&Calendar=" & sCalendar & "&P=" & objReader.GetString(6) &
"&Pass=" & objReader.GetString(1) & "&Act=" & objReader.GetString(7) &
"&SKUStat=" & Session("ViewProdHierSKUStatus") & "&Oldsys=" &
Session("ViewOldSys") & "&Permission=" & Session("Permission"))
Here is the page load piece
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
If Request.QueryString("User") = "" Then
lblUser.Text = Session("UserName")
End If
If Session("Sales") = "" Then
Session("Permission") = Request.QueryString("P")
Session("Pass") = Request.QueryString("Pass")
Session("UserName") = Request.QueryString("Name")
Session("ActUser") = Request.QueryString("Act")
Session("User") = Request.QueryString("User")
Session("Sales") = Request.QueryString("Sales")
Session("Calendar") = Request.QueryString("Calendar")
Session("Sales") = Session("Sales").replace("-", "/")
Session("Sales") = Session("Sales").replace(".", ":")
Session("Calendar") = Session("Calendar").replace("-", "/")
Session("Calendar") = Session("Calendar").replace(".", ":")
Session("ViewProdHierSKUStatus") =
Request.QueryString("SKUStat")
Session("ViewOldSys") = Request.QueryString("Oldsys")
End If
If Session("UserName") = "" Then
Server.Transfer("../Default.aspx")
End If
Session("ActUser") = UCase(Session("ActUser"))
Dim xxyz As String
--> xxyz = Session("availabilityrptlevel")
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.getstring), 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.