Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

Correct Way To Make StyleSheet Work With ASCX Control

$
0
0

Hi.

I have the following markup in an ASCX control that creates tabs (It's from this microsoft example: http://msdn.microsoft.com/en-us/library/jj573263(v=office.14).aspx )

<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %><%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %><%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %><%@ Import Namespace="Microsoft.SharePoint" %> <%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %><%@ Control Language="C#" AutoEventWireup="true" CodeBehind="TabbedWebPartUserControl.ascx.cs" Inherits="TabbedWebPart.UX.TabbedWebPart.TabbedWebPartUserControl" %><link type="text/css" rel="stylesheet" href="~/STYLES/jQuery-Tab/tabstyles.css" /><script type="text/javascript">
	$(function () {
		$("#tabs<%= this.ClientID%>").tabs();
	});</script><div id="tabs<%= this.ClientID%>"><ul><asp:Repeater runat="server" ID="TabRepeater"><ItemTemplate><li><a href="#tabs<%# this.ClientID%>-<%# Container.ItemIndex + 1 %>"><%# Container.DataItem%></a></li></ItemTemplate></asp:Repeater></ul><asp:Repeater runat="server" ID="TabContainerRepeater" onitemdatabound="TabContainerRepeater_ItemDataBound"><ItemTemplate><div id="tabs<%# this.ClientID%>-<%# Container.ItemIndex + 1 %>" class="ui-tabs-hide"><asp:Panel runat="server" ID="TabContainer"></asp:Panel></div></ItemTemplate></asp:Repeater></div>

I have created my own stylesheet called tabstyles.css and it is deploying with the feature.  But the ASCX control does not seem to render the styles in the stylesheet.

How do I force the ASCX control to use this custom stylesheet?


Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>