hi.
First i created the BasePage:
Code:
Imports Microsoft.VisualBasic
Public Class BasePage
Inherits System.Web.UI.Page
Private Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
If Me.Title = "Untitled Page" Or String.IsNullOrEmpty(Me.Title) Then
Throw New Exception("Page title cannot be ""Untitled Page"" or an empty string.")
End If
End Sub
End Class
Then I changed the class for Login.aspx.
vb like this:
Code:
Partial Class Login
Inherits BasePage
End Class
Tried it in the browser at this worked fine.
Then i changed System.Web.UI.Page to BasePage for the Default.aspx.
vb and the Frontpage.master.
vb, saved the changes. this code-files looks like this:
Code:
Partial Class Masterpage_Frontend
Inherits BasePage
End Class
Code:
Partial Class _Default
Inherits BasePage
End Class
After these changes i'm getting errors, in the explorer this looks like this:
Kildefeil:
Linje 1:
Linje 2: Partial Class Masterpage_Frontend
Linje 3: Inherits BasePage
Linje 4: End Class
I tride to change back til System.Web.UI.Page, but same error.
any ide what is wrong?