I wanted to add a user control to a MasterPage. I added the control to a VS Solution and deployed it. Then I opened the MasterPage via SharePoint Designer and added the following code:
<%@ Register TagPrefix="uc0" TagName="LanguageChecker" Src="~/_controltemplates/Project/UserControls/LanguageChecker.ascx" %>
Now when I open a page that uses this .master I get the following error:
Server Error. The resource cannot be found.
When I looked at the page sorce it said:
/_controltemplates/Project/UserControls/LanguageChecker.ascx does not exist.
Of course it doesn't. The file path is missing the Site Url in the beginning.
I looked and found some possible problems. The only one that caught my attention was: SharePoint Designer might remove the "~/" from registration of the User Control in the master. I opened the designer again but the ~/ is there. I want to see the file itself, to check if the ~/ exists in it.
However the MasterPage has been added via the SharePoint Designer and I do not know where to look for the actual file. Is it on the Hard Drive?
I tryed to find the user control by it's Url(full, correct) and it's there.
I am using SharePoint 2010