I have security on my page and want to use sessions to grant access.
On the index.aspx.vb page I have
Session("FO") =Data1.OfficeCode (my validation to get the FO)
Session("Pos") = Data1.FnCode (my validation to get the Pos)
Region FO >300 DDS >300 FO & DDS 250 - 300
PHI 626 266 876
Area 2 28 24 80
227 1 4 7
C08 0 0 1
C14 5 0 3
I'm logged into this person who is Session("FO") = C14 and the Session("Pos") = CRGXX
So when I get to this page I only want to see links for the C14 row which I belong to. I still see all of the links for C08 and 227
I placed this in the code behind where the gridview is located but it does nothing.
If e.Row.Cells(1).Text = Session("FO").ToString() AndAlso Session("Pos").ToString() = "CRGXX" AndAlso e.Row.Cells(1).Text = Session("FO").ToString() _
AndAlso e.Row.Cells(2).Text = Session("FO").ToString() AndAlso Session("Pos").ToString() = "CRGXX" AndAlso e.Row.Cells(2).Text = Session("FO").ToString() _
AndAlso e.Row.Cells(3).Text = Session("FO").ToString() AndAlso Session("Pos").ToString() = "CRGXX" AndAlso e.Row.Cells(3).Text = Session("FO").ToString() Then
End If
What am I doing wrong?
On the index.aspx.vb page I have
Session("FO") =Data1.OfficeCode (my validation to get the FO)
Session("Pos") = Data1.FnCode (my validation to get the Pos)
Region FO >300 DDS >300 FO & DDS 250 - 300
PHI 626 266 876
Area 2 28 24 80
227 1 4 7
C08 0 0 1
C14 5 0 3
I'm logged into this person who is Session("FO") = C14 and the Session("Pos") = CRGXX
So when I get to this page I only want to see links for the C14 row which I belong to. I still see all of the links for C08 and 227
I placed this in the code behind where the gridview is located but it does nothing.
If e.Row.Cells(1).Text = Session("FO").ToString() AndAlso Session("Pos").ToString() = "CRGXX" AndAlso e.Row.Cells(1).Text = Session("FO").ToString() _
AndAlso e.Row.Cells(2).Text = Session("FO").ToString() AndAlso Session("Pos").ToString() = "CRGXX" AndAlso e.Row.Cells(2).Text = Session("FO").ToString() _
AndAlso e.Row.Cells(3).Text = Session("FO").ToString() AndAlso Session("Pos").ToString() = "CRGXX" AndAlso e.Row.Cells(3).Text = Session("FO").ToString() Then
End If
What am I doing wrong?