Put this directive in the top of your aspx file:
<%@ MasterType VirtualPath=”~/Templates/MasterPages/Default.Master” %>
The aspx-file gets reference to the masterpages properties in code-behind trough Master.PropertyName e.g:
Works in Web Forms ASP.NET 4.0 as well.
This seems like a nice “does it all” nuget package:
Bundling and minifications, gzip, cache headers
- All in one solution supporting JS/CSS combination, minification, compression and caching (by adding proper Expires/Cache-Control headers, ETag and server-side caching)
- Easy to use, simply download it via Nuget, declare JS and CSS resource groups in an XML file and use them in your pages, Combres will take care of the rest
- Integrated with ASP.NET routing engine and work with ASP.NET WebForm 3.5/4.0/4.5, ASP.NET MVC 2/3/4 and Azure web applications
- Detect changes in Combres config file, managed JS/CSS files and support auto-versioning, so you don’t have to manually rebundle JS/CSS resources after making changes to them
- Extensible architecture with many extension points
- And many more: CDN, HTTPS, debug mode, external JS/CSS (dynamically requested from other servers), Less CSS etc.
- Proven solution with many thousands of downloads in NuGet, CodePlex and The Code Project
The ASP.NET Framework has been around for over ten years, and the platform has enabled the development of countless Web sites and services. As Web application development strategies have evolved, the framework has been able to evolve in step with technologies like ASP.NET MVC and ASP.NET Web API. As Web application development takes its next evolutionary step into the world of cloud computing, project Katana provides the underlying set of components to ASP.NET applications, enabling them to be flexible, portable, lightweight, and provide better performance – put another way, project Katana cloud optimizes your ASP.NET applications.
To overcome this error, you should clear the previous selection of your ddl as following: