J
Jon
I have made the following class and want all my pages to inherit from it instead of system.web.ui.page. this works fine, except that now in the designer none of the controls have names and I get an error "Type Abstract" when I do switch to designer mode...
I can't use windows forms auth because we use frames and iframes on the site, and each of them gets redirected to the login page, instead of just the central content frame. If there's a way around that, I won't need to do the checking below...
Any ideas?
Here is the class they inherit from:
Public Class PageAuth
Inherits System.Web.UI.Page
Public Sub New()
AddHandler MyBase.Load, AddressOf Me.PageAuth_Load
End Sub
Private Sub PageAuth_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
AccessCheck()
End Sub
Private Sub AccessCheck()
Dim oTemp As Object
oTemp = Session("UserEmpNo")
If oTemp Is Nothing Then
Response.Redirect("login.aspx?s=NoSession", True)
End If
If CType(oTemp, String) = "" Then
Response.Redirect("login.aspx?s=NoSession", True)
End If
End Sub
End Class
I can't use windows forms auth because we use frames and iframes on the site, and each of them gets redirected to the login page, instead of just the central content frame. If there's a way around that, I won't need to do the checking below...
Any ideas?
Here is the class they inherit from:
Public Class PageAuth
Inherits System.Web.UI.Page
Public Sub New()
AddHandler MyBase.Load, AddressOf Me.PageAuth_Load
End Sub
Private Sub PageAuth_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
AccessCheck()
End Sub
Private Sub AccessCheck()
Dim oTemp As Object
oTemp = Session("UserEmpNo")
If oTemp Is Nothing Then
Response.Redirect("login.aspx?s=NoSession", True)
End If
If CType(oTemp, String) = "" Then
Response.Redirect("login.aspx?s=NoSession", True)
End If
End Sub
End Class