Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Apr 10, 2009 06:12 AM by sandydotnet
Member
59 Points
58 Posts
Apr 08, 2009 06:26 AM|LINK
Hi,
I have created styles for my mobile controls. I could able apply these styles to page and lables but for button and link its not reflecting.
Please tell me how can i apply styles to all controls.
Participant
1930 Points
435 Posts
Apr 08, 2009 02:32 PM|LINK
Hello,
take a look at the following thread:
http://forums.asp.net/t/1357842.aspx#2793740
Apr 09, 2009 12:19 PM|LINK
Hi ,
Thank you for your reply. I have gone through this thread and i developed the same.
I could not able to applicable the styles for button controls.
Pls help me in this regards.
Thank you in advance.
Apr 09, 2009 02:51 PM|LINK
sandydotnet I could not able to applicable the styles for button controls.
take a look at the source code if your style rules are rendered and ensure that those styles are applied correctly, i. e. the selectors must match.
Apr 10, 2009 04:36 AM|LINK
Please check this code, i have written this code in ascx page
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Styles.ascx.cs" Inherits="Styles" %> <%@ Register TagPrefix="mobile" Namespace="System.Web.UI.MobileControls" Assembly="System.Web.Mobile" %>
<mobile:StyleSheet ID="MyStyles" Runat="server">
<mobile:Style Name="MyCommand" BackColor="#0000cc" ForeColor="Black" Font-Italic="False" Alignment="Center" Font-Size="Large" ></mobile:Style>
</mobile:StyleSheet>
I have referenced above styles in aspx page as below.
<mobile:StyleSheet ID="MyStyles" Runat="server" ReferencePath="Styles.ascx"> </mobile:StyleSheet>
<mobile:Command StyleReference="MyCommand" BreakAfter="False" Runat="server" ID="cmdLogin" OnClick="cmdLogin_Click" Alignment="Right" >Login</mobile:Command>
<mobile:Label Runat="server" BreakAfter="False" StyleReference="MyCommand" ID="lblPassword" Alignment="Left" >Password</mobile:Label>
I am applying styles to both Lable and Button controls. For lable it is reflecting and for Command it not.
I dont find the reason for this.
Please help in this regards.
I have one more question is it possible to allign mobile controls in a single lin???. like i want to put both lable and textbox in a single line.
Thank you.
Apr 10, 2009 06:05 AM|LINK
you have decided to use the obsolete style application for mobile controls and I can no more help you.
Apr 10, 2009 06:12 AM|LINK
I am getting you, but i am using VS 2008 with Framework 2.0
sandydotnet
Member
59 Points
58 Posts
Styles to mobile controls
Apr 08, 2009 06:26 AM|LINK
Hi,
I have created styles for my mobile controls. I could able apply these styles to page and lables but for button and link its not reflecting.
Please tell me how can i apply styles to all controls.
SKT_01
Participant
1930 Points
435 Posts
Re: Styles to mobile controls
Apr 08, 2009 02:32 PM|LINK
Hello,
take a look at the following thread:
http://forums.asp.net/t/1357842.aspx#2793740
sandydotnet
Member
59 Points
58 Posts
Re: Styles to mobile controls
Apr 09, 2009 12:19 PM|LINK
Hi ,
Thank you for your reply. I have gone through this thread and i developed the same.
I could not able to applicable the styles for button controls.
Pls help me in this regards.
Thank you in advance.
SKT_01
Participant
1930 Points
435 Posts
Re: Styles to mobile controls
Apr 09, 2009 02:51 PM|LINK
Hello,
take a look at the source code if your style rules are rendered and ensure that those styles are applied correctly, i. e. the selectors must match.
sandydotnet
Member
59 Points
58 Posts
Re: Styles to mobile controls
Apr 10, 2009 04:36 AM|LINK
Please check this code, i have written this code in ascx page
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Styles.ascx.cs" Inherits="Styles" %>
<%@ Register TagPrefix="mobile" Namespace="System.Web.UI.MobileControls" Assembly="System.Web.Mobile" %>
<mobile:StyleSheet ID="MyStyles" Runat="server">
<mobile:Style Name="MyCommand" BackColor="#0000cc" ForeColor="Black" Font-Italic="False" Alignment="Center" Font-Size="Large" ></mobile:Style>
</mobile:StyleSheet>
I have referenced above styles in aspx page as below.
<mobile:StyleSheet ID="MyStyles" Runat="server" ReferencePath="Styles.ascx">
</mobile:StyleSheet>
<mobile:Command StyleReference="MyCommand" BreakAfter="False" Runat="server" ID="cmdLogin" OnClick="cmdLogin_Click" Alignment="Right" >Login</mobile:Command>
<mobile:Label Runat="server" BreakAfter="False" StyleReference="MyCommand" ID="lblPassword" Alignment="Left" >Password</mobile:Label>
I am applying styles to both Lable and Button controls. For lable it is reflecting and for Command it not.
I dont find the reason for this.
Please help in this regards.
I have one more question is it possible to allign mobile controls in a single lin???. like i want to put both lable and textbox in a single line.
Thank you.
SKT_01
Participant
1930 Points
435 Posts
Re: Styles to mobile controls
Apr 10, 2009 06:05 AM|LINK
Hello,
you have decided to use the obsolete style application for mobile controls and I can no more help you.
sandydotnet
Member
59 Points
58 Posts
Re: Styles to mobile controls
Apr 10, 2009 06:12 AM|LINK
I am getting you, but i am using VS 2008 with Framework 2.0