Link to home
Start Free TrialLog in
Avatar of TrialUser
TrialUserFlag for Afghanistan

asked on

content place holder in head section of the master page

I am wondering why there is a content place holder in the <head> section in the master page. What can I use this section for in the master page and in the page that consume this master page.
Thanks
Avatar of Comtek
Comtek

You can put lots of stuff here. Anything that would normally go in the heading section of a typical web page. Probably one of the must common things is JavaScript code. Other items that could go in there are links to stylesheets and the page title.
if you want to add a style or javascript, and that is only usefull in a particular page, then you can add that script to that pages content head section
Avatar of TrialUser

ASKER

Ok, a follow up question, so in th master age when I do add a link to a style sheet, i need to put it inside the Content place holder like this or outside:

<head runat="server">
    <title></title>
   
    <asp:ContentPlaceHolder ID="head" runat="server">
    <link href="~/Styles/Main.css" rel="stylesheet" type="text/css" />
    </asp:ContentPlaceHolder>
</head>
ASKER CERTIFIED SOLUTION
Avatar of Comtek
Comtek

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks a ton for your timely, detailed explanation