I get an error in .net when I try to declare an open class in my code after page.
Partial Class _Default
Inherits System.Web.UI.Page
Public someVariable as integer
Public someClass as className
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load [...]
The error I get is this BC30508: 'someClass' cannot expose type 'className' in namespace '<Default>' through class '_Default'.
The goal here is to access class properties in script blocks on an aspx page like this <%=someClass.classProperty%>
I'm not sure that I am trying to use the correct methods (I tried several ways to declare a public class), or if you can even do this ... Thanks for looking at it.
source
share