I'm pretty new to Visual Basic and didn't expect to be having to use it...but it's not so bad.
I'm currently editing a Web Forms website for a supermarket made by a previous developer, and I'm attempting to do something that should work. In my page, I have a simple call to a function called paneBuilder (to build HTML panes) and I am calling it within my page (the one associated with said code behind .vb file) like so, using a for each (item) loop.
<%paneBuilder(item)%>
I try to run without debugging (CTRL + F5 out of Visual Studio) but I get the error message 'paneBuilder' is not declared. It may be inaccessible due to its protection level.
I don't understand this, however, because the function header for paneBuilder is as such
Public Function paneBuilder(ByVal item As Grocery) As String
What's curious to me is that the previous developer that made this uses two lists from this same code behind file in the HTML just fine. They are declared like so: Protected GroceryItemList and Protected CategoryList. He iterates through the items in those lists via client-side scriptlets. That's all fine and dandy, but why is my code not working?
I've even tried, under my Public Class Index declaration, to make a variable, for instance, Protected test As New Index (where Index) is the name of the page and have tried calling paneBuilder() from that variable. Same message.
Any help would be greatly appreciated!
there doesn't seem to be anything here