0

ok,
I am new to master pages. I have created a public function called setMenu in the cs file.

I can call this function fine from about half of my pages, but when i try to call it from the other half, it won't compile and I get

'System.Web.UI.MasterPage' does not contain a definition for 'setMenu'

I'm calling it exactly the same way in all the pages. Any ideas?

1
Contributor
1
Reply
2
Views
10 Years
Discussion Span
Last Post by campkev
0

ok, figured out the problem. needed the following line in the aspx page. Evidently, this makes functions from the master accessible by the content page

<%@ MasterType VirtualPath="~/MyMaster.master" %>

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.