Click here to Skip to main content
15,905,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
When I use following link tag in normal aspx page, it is working fine.
But when I used it in content page of master, it's not working.
What's the problem? Where I should keep it?
HTML
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />

Thanks
Posted
Updated 30-Aug-11 17:20pm
v3
Comments
Prerak Patel 30-Aug-11 23:23pm    
Use code block to highlight the code.

You should include that link tag in master page itself. If you want to do it with content page, you need to add it via code.
VB
Protected Sub Page_Load(ByVal sender As Object, _
                         ByVal e As System.EventArgs)
   Dim cssLink As New HtmlLink()
   cssLink.Href = "~/styles.css"
   cssLink.Attributes.Add("rel", "stylesheet")
   cssLink.Attributes.Add("type", "text/css")
   Header.Controls.Add(cssLink)
End Sub

IMO, you should place your link tag in master page within head.
 
Share this answer
 
Idealy all these kind of refernces should be added to head Tag of MasterPage.

Below link will give you more information.
Calling JavaScript from ASP.NET Master Page and Content Pages - Part I
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900