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.   I searched the answer and find the following MSDN link very helpful: http://msdn.microsoft.com/en-us/library/c8y19k6h.aspx .  We need to add the following…

0

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…

0

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. /// <reference path="JScript2.js" /> What if you have many JavaScript files and you’ve to reference many project wide JavaScript files inside each file?  You can put the following block in each of the JavaScript…

0

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…

3

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: <connectionStrings> <add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" /> </connectionStrings> To get the aspnetdb.mdf created on the fly, one can simply Ctrl-F5 to run the web site or web…

4

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…

6

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) Figure 1 – New information (‘hint’) buttons (see circled question marks) There are two keys to remember when trying to view the ‘help’…

2

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. The…

1

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: To the new look in VS2010: Of course, ASP.NET website projects are still around and not going away soon. …

3

Tip#102: Did you know… How to specify tag specific formatting

Let’s see this with an example.  I have the following html code on my page. Now if I format the document by selecting Edit –> Format document (or Ctrl K, Ctrl D) The document becomes I want the content inside td should remain on the same line after formatting the document. Following steps would show…

2