Solution | Unable to write output file ‘…pdb’; unspecified error

Visual Studio 2005 / 2008

During this weekend, I started having a problem when building a solution in Visual Studio. It would load the following error:

Unable to write to output file Solution_Name.pdb

This Visual Studio solution has 8 projects, and a lot of files and folders. I tried several solutions that I found on the net, which worked for others, but none worked for my case including:

  • Delete the .pdb file from the solution – Didn’t Work
  • Delete the Debug folder – Still Didn’t work
  • Delete the whole obj Folder – Nothing Continue reading

Reference Controls from MasterPage

To reference controls from a master page in a normal page use the following syntax:

Ex. Reference the Head Html tag of the Master Page from a normal page to add scripts in the head. Set the Head as runat=”server” and give id=”Head”, then enter the following syntax:

HtmlHead headTag = ((HtmlHead)((MasterPageName)this.Master).FindControl(“Head”));

Hope this helps. Btw this will mostly be used in Visual Studio 2005 since in the new versions, you can add an ContentPlaceHolder in the Head tag of the Master page and insert any scripts in the PlaceHolder on the page