SharePoint: How to use relative URL for image in Master Page

<asp:Image ID="Image1" ImageUrl="<% $SPUrl:~sitecollection/Style Library/img/image.jpg %>" class="left-img-responsive" runat="server" />

SharePoint 2013 – BootStrap – Search Box drop down options not displaying on certain pages

OK, I have run into another boggling situation where the default Search Box dropdown is not giving me the search options on my home page… but it is showing on most of the other pages in the site collection?

After some digging in the guts of the master page and and searching the inter-webs… I have a solution 🙂

Just add a reference to ajaxcontroltoolkit in your master page and bob’s you uncle:

<script type="text/javascript">
          SP.SOD.executeOrDelayUntilScriptLoaded(function () {
         SP.SOD.executeOrDelayUntilScriptLoaded(function () {
RegisterSod("ajaxtoolkit.js",  SP.Utilities.Utility.getLayoutsPageUrl('ajaxtoolkit.js'));
}, 'strings.js');
}, 'sp.js');

Please note that if you are using Design Manager please add the below code to Bootstrap.html instead:

<!--MS:<SharePoint:ScriptLink language="javascript" name="ajaxtoolkit.js" OnDemand="true" runat="server" Localizable="false">-->

If you get a chance please check out this CodePlex project: