c# - asp.net where to put the head tag -
i working on project. asp.net page starts with:
<head runat="server"> <meta charset="utf-8"> <title>online sms choose</title> <link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css"> <link id="link1" rel="stylesheet" runat="server" media="screen" href="~/css/tablestyle.css" /> <link id="link2" rel="stylesheet" runat="server" media="screen" href="~/css/loadingstyle.css" /> <link id="link3" rel="stylesheet" runat="server" media="screen" href="~/css/selectstyle.css" /> <script src="//code.jquery.com/jquery-1.9.1.js"></script> <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script> <link rel="stylesheet" href="/resources/demos/style.css"> <script> $(function () { $("#tabs").tabs(); }); $(function () { $("#datepicker").datepicker(); }); </script> </head>
then manager told me have merge project one. gave me code of other project. code doesn't have head
tag in it. has @ start of page:
<%@ page title="service categories" language="c#" masterpagefile="~/site.master" autoeventwireup="true" codebehind="default.aspx.cs" inherits="service._default" %> <asp:content id="headercontent" runat="server" contentplaceholderid="headcontent"> <script type="text/javascript" src="scripts/zeroclipboard.js"></script> <script type="text/javascript" src="scripts/main.js"></script> </asp:content> <asp:content id="bodycontent" runat="server" contentplaceholderid="maincontent"> <div class="content" id="content">
my question
where can put head tag ?
the first code snippet provided standard html markup , second asp.net markup sure aware.
you can combine both of them in following manner:
<%@ page title="service categories" language="c#" masterpagefile="~/site.master" autoeventwireup="true" codebehind="default.aspx.cs" inherits="service._default" %> <asp:content id="headercontent" runat="server" contentplaceholderid="headcontent"> <script type="text/javascript" src="scripts/zeroclipboard.js"></script> <script type="text/javascript" src="scripts/main.js"></script> <title>online sms choose</title> <link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css"> <link id="link1" rel="stylesheet" runat="server" media="screen" href="~/css/tablestyle.css" /> <link id="link2" rel="stylesheet" runat="server" media="screen" href="~/css/loadingstyle.css" /> <link id="link3" rel="stylesheet" runat="server" media="screen" href="~/css/selectstyle.css" /> <script src="//code.jquery.com/jquery-1.9.1.js"></script> <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script> <link rel="stylesheet" href="/resources/demos/style.css"> <script> $(function () { $("#tabs").tabs(); }); $(function () { $("#datepicker").datepicker(); }); </script> </asp:content> <asp:content id="bodycontent" runat="server" contentplaceholderid="maincontent"> <div class="content" id="content"> ........
Comments
Post a Comment