in asp.net (vb.net)in visual studio 2019 community i try to use public class in app_code

35 Views Asked by At

**i define public class in app_code :

Public Class BasePage
  Inherits System.Web.UI.Page
  Private Sub Page_PreRender(sender As Object, e As EventArgs) Handles Me.PreRender
    If String.IsNullOrEmpty(Me.Title) OrElse Me.Title.Equals("Untitled Page", StringComparison.CurrentCultureIgnoreCase) Then
      Throw New Exception("Page title cannot be ""Untitled Page"" or an empty string.")
    End If
  End Sub

then i use in form i create form called login:

Partial Public Class Login
    Inherits BasePage

End Class

give me error Error BC30002 Type 'BasePage' is not defined. planetwork

**

0

There are 0 best solutions below