Web Developer Tips
-
Tip #110 Did you know … How to referencing root project’s master page’s properties from sub project’s content page?
Recently, I received a question referring to our blog Part 2 of 3: Creating shared user controls and master pages with sub-projects , asking how to reference master page’s properties from a sub project.
-
Tip #109 Did you know … How to speed up build time by *only* building the currently selected project in a multi-project solution?
When working with a solution that contains numerous projects, I find myself often wanting to only build and run the currently selected project. Other projects in the solution might have build errors that I don’t want to resolve at the current time. By default though, trying to do a CTRL+F5 on the currently selected project will cause Visual Studio (VS) to build all of the projects in a solution.
-
Tip #108 Did you know … How to improve reference efficiency in JavaScript files inside a web project?
In Visual Studio 2010, we can reference other JavaScript files inside current JavaScript file like the following, to get the IntelliSense.
-
Tip #107 Did you know … How to improve debugging performance for MVC2 application in Visual Studio 2010 Ultimate?
VS2010 Ultimate included IntelliTrace functionality by default. IntelliTrace captures events (e.g. exceptions), and can affect performance of debugging. The typical performance hit is about 5% in the default mode (collection can be increased to collect method calls and parameters which can have up to a 15x hit). However this is completely dependent on what events and how many are occurring. For example, the MVC2 framework uses exceptions for control flow (hundreds can occur when loading a web page), and so launching an MVC app with IntelliTrace enabled runs significantly slower because a call stack is captured for every exception.
-
Tip #106 Did you know … How to solve the errors when aspnetdb.mdf is created dynamically with IIS?
In VS2010 all editions, the default .NET Framework 4.0 ASP.NET Web Site and Web Application template create default website with following connection string in the web.config:
-
Tip #106 Did you know … How to create the aspnetdb.mdf file?
VS2005, VS2008, VS2010 all supports the following ways to create aspnetdb.mdf file:
-
Tip #105: Did you know … How to include empty directory when package a web application?
By design, Visual Studio 2010 will skip the empty directory when packaging web application project using web deploy. To get empty directory packaged and deployed, we can work around this by adding an empty stub file inside the directory to make it non-empty. Then web deploy will package and deploy the directory with the stub file.
-
Tip #104: Did you know … How to view text for the ‘hint’ buttons on the Publish Web Dialog?
After the Beta 2 release of Visual Studio 2010, the Publish Web Dialog was modified to include two information buttons associated with the Service URL and Site/application text boxes. (See Figure 1)
-
Tip #103 revisited
In Tip #103 I showed a way of customizing the start page in order to add the New Website and Open Website controls. It turns out that using a loose XAML file as I did in that post is not the recommended practice; in fact, it’s recommended that you don’t do it that way.
-
Tip #103: Adding the New Website and Open Website buttons to the VS2010 Start Page
In the new VS2010 UI, the start page has been completely re-written. Part of the changes made were to hide the New Website and Open Website buttons. Basically it went from the old look in VS2008: