User2098947605 posted
I'm trying to get the Mobile Stylesheet control to work in a User Control, per the documentation but it just isn't. Works fine when I place the styles in the Stylesheet control on the ASPX, but when I set the ReferecnePath of the ASPX Stylesheet
control to the ASCX that contains the styles it doesn't work. Anyone know what the trick is?
Here's my code.
The page contains:
<body Xmlns:mobile="http://schemas.microsoft.com/Mobile/WebForm">
<mobile:stylesheet id="StyleSheet1" runat="server" ReferencePath="styles.ascx">
</mobile:stylesheet>
<mobile:form id="Form1" title="Vendors" runat="server">
<mobile:Label id="Label1" runat="server" StyleReference="lbl">ID</mobile:Label>
</mobile:form>
</body>
styles.ascx contains:
<%@ Register TagPrefix="mobile" Namespace="System.Web.UI.MobileControls" Assembly="System.Web.Mobile" %>
<%@ Control Language="vb" AutoEventWireup="false" Codebehind="styles.ascx.vb" Inherits="MobileWebApplication1.styles" TargetSchema="http://schemas.microsoft.com/Mobile/WebUserControl" %>
<mobile:StyleSheet id="StyleSheet1" runat="server" >
<mobile:Style Name="lbl" ForeColor="navy" Font-Bold="True" Alignment="Right"></mobile:Style>
<mobile:Style Name="cmd" BackColor="navy" ForeColor="white" Font-Bold="True"></mobile:Style>
<mobile:Style Name="lnk" Alignment="Center"></mobile:Style>
<PagerStyle Name="pgr" BackColor="navy" ForeColor="yellow" Font-Bold="True"></PagerStyle>
</mobile:StyleSheet>
Thanks<%@ Page Language="vb" AutoEventWireup="false" Codebehind="Vendor.aspx.vb" Inherits="MobileWebApplication1.Vendor" %>