ASP.NET 4.5 and ASP.NET MVC 4 Support in ReSharper 7
In spite of all the wonderful things happening in the Windows 8/WinRT world, ReSharper continues to provide support for existing technologies such as ASP.NET. In the latest release, ReSharper is augmented with new features for supporting ASP.NET 4.5 and ASP.NET MVC 4. Here’s what we’ve got in store.
In ASP.NET 4.5, Web Forms support includes several improvements when working with data. Here are the ones that ReSharper now understands and supports:
Strongly Typed Data Controls — instead of using
Bind()for data binding, ASP.NET 4.5 lets developers declare the type of the element being bound via the
ItemTypeproperty and provides the
BindItemproperties inside binding expressions. ReSharper provides full support for these new constructs with code completion:
Inspections, fixes, refactorings and other typical ReSharper features are also supported:
Model Binding — this mechanism lets one bind controls to data acquired from a particular function on the page, defined in the
SelectMethodproperty. Once again, ReSharper provides typical features such as code completion…
… as well as navigation, refactorings and other features typical for a C# property. Additionally, ReSharper is smart to check the return type of the
SelectMethodand issue a warning if its type does not match that of the
ReSharper is now also aware of HTML Encoded Data-Binding Expressions, which let developers add a colon (:) to the
<%#prefix to ensure the subject of a data binding expression is HTML-encoded.
Of course, ReSharper also supports typical features such as code completion and validation inside the string literals that are used in the
ASP.NET MVC 4
ReSharper 7 extends its support for ASP.NET MVC to projects that use the ASP.NET Web API — the new framework for creating HTTP services. This means typical features such as inspections, navigation and refactorings are now available for Web API projects.
In addition, ReSharper now supports the Display Modes feature of MVC4, which lets an application select views depending on what browser makes the request. For example, ReSharper’s Go to Declaration on a view reference will show all the view files with different display modes:
In a similar fashion, performing a Find Usages on a view file with a display mode suffix will correctly locate its usages. Also, ReSharper is smart enough to detect when custom display modes are defined.
We hope you find these new ASP.NET-related features beneficial in your everyday development. Meanwhile, we continue to add more goodness to our support of the ASP.NET stack. Stay tuned for more!
Subscribe to Blog updates
Thanks, we've got you!
Eager, Lazy and Explicit Loading with Entity Framework Core
Entity Framework Core (EF Core) supports a number of ways to load related data. There’s eager loading, lazy loading, and explicit loading. Each of these approaches have their own advantages and drawbacks. In this post, let’s have a quick look at each of these ways to load data for navigational prope…
OSS Power-Ups: bUnit – Webinar Recording
The recording of our webinar, OSS Power-Ups: bUnit, with Egil Hansen and Steven Giesel, is available. This was the twelfth episode of our OSS Power-Ups series, where we put a spotlight on open-source .NET projects. Subscribe to our community newsletter to receive notifications about future webi…
Accelerating Your Testing Workflow with Unit Test Creation and Navigation
Unit tests play an important role in our daily development workflow. They help us ensure our codebase's correctness when writing new functionality or performing refactorings to improve readability and maintainability. In the process, we often create new test files that accompany the p…
Introducing Predictive Debugging: A Game-Changing Look into the Future
With the introduction of debugging tools, software developers were empowered to interactively investigate the control flow of software programs to find bugs in live environments. At JetBrains, we've always strived to improve the art of debugging. Besides the more standard things you expect from a de…