First Method
Remove JavaScript from the header section of page and add it to body of the page and run your application it will work for you.
Second Method
Replace the code block with <%# instead of <%=
<head id="head2" runat="server">
<title>Lightbox Page</title>
<link href="aspdotnetsuresh.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%# ResolveUrl("~/js/LightBox.js") %>"></script>
</head>
|
After replace code block with <%# instead of <%= add following code in page load
protected void Page_Load(object sender, EventArgs e)
{
Page.Header.DataBind();
}Third Method
Add the Placeholder in header and body part of the Master page.
<head id="head2" runat="server">
<title>Lightbox Page</title>
<asp:PlaceHolder ID="PlaceHolderHeader" runat="server">
<link href="aspdotnetsuresh.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%# ResolveUrl("~/js/LightBox.js") %>"></script>
</asp:PlaceHolder>
</head><body class="body">
<form id="form1" runat="server">
<asp:PlaceHolder ID="PlaceHolder1" runat="server">
---- past here all code
</asp:PlaceHolder>
</form>
</body>