Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
750
WebDataMenu Inaccessible due to protection level
posted

I am using 2017.1 in C#, and cannot use the WebDataMenu.  The same controls and code works fine in VB for some reason.

These are the errors:

Error 1 The property or indexer 'Infragistics.Web.UI.NavigationControls.NavControl.Items' cannot be used in this context because the get accessor is inaccessible C:\Users\Administrator\Documents\MyProjects\Visual Studio\SeeSharpTesting\SeeSharpTesting\Default.aspx.cs 15 13 SeeSharpTesting
Error 2 'Infragistics.Web.UI.NavigationControls.NavControl.Items' is inaccessible due to its protection level C:\Users\Administrator\Documents\MyProjects\Visual Studio\SeeSharpTesting\SeeSharpTesting\Default.aspx.cs 15 17 SeeSharpTesting

  • 2490
    Verified Answer
    Offline posted

    Hello Monica,

    Thank you for contacting Infragistics Developer Support.

    If you add dynamically WebDataMenu to your page, it might be inaccessible due to the Restriction of Accessor Accessibility. In this case you can increase the setter's and the getter's visibility (e.g. by making them public), or by adding a getter if it is not declared, as described in this Stack Overflow Topic.

    If both of those suggestions does not resolve your issue, you can send a code snippet of how you declare and use the WebDataMenu in your project. Another option is, if you could locate the .aspx and aspx.cs files, where you use the WebDataMenu, zip them and upload them. This will help to further investigate this for you.