Testing device filters on a mobile form I encountered the following error:
Can find neither a device capability named ‘IsNotMobile’ nor a public non-static method on the page named ‘IsNotMobile’ that returns a System.Boolean and takes System.Web.Mobile.MobileCapabilities and System.String as arguments.
I check the web.config and figured that the deviceFilters were properly declared:
<filter name="IsMobile" compare="IsMobileDevice" argument="true" />
<filter name="IsNotMobile" compare="IsMobileDevice" argument="false" />
Eventually I figured out that creating the device filters with microsoft’s dialogs added an empty namespace attribute to the deviceFilter element. After removing the xmlns="" everything works fine.