• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1975
  • Last Modified:

Applying CSS in ASP.net Mobile

Hi Experts,
I'm new in ASP.net Mobile .
I'm currently converting my ASP.net web portal to ASP.net Mobile WAP portal and i'm facing problem on applying  the CSS that i'm using in web page into WAP page.
Can anyone help?

Thanks.
0
mkdev2009
Asked:
mkdev2009
  • 4
  • 2
2 Solutions
 
DhaestCommented:
Support Mobile Devices in ASP.NET (Advances Topics)
- How to customize mobile pages by Device Type
- Using Cascading Style sheets in mobile pages
- Developing User Friendly Mobile Pages:

http://www.beansoftware.com/ASP.NET-Tutorials/CSS-Mobile-Device.aspx
0
 
myderrickCommented:
This should help:
http://www.developershome.com/wap/wcss/wcss_tutorial.asp?page=introduction
http://www.nic.fi/~tapio1/Teaching/WAP.php3

I have also attached a documentation on using CSS for WAP.

I hope this helps.

Good luck

MD
WAP-239-WCSS-20011026-a.pdf
0
 
mkdev2009Author Commented:
Hi guys..
thanks for help, i currently able to use the style sheet by insert the style sheet code at the top of my mobile form but i more prefer to use external style sheet so that i can use the same style sheet at every wap page.

Anyone know how to create external style sheet?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
DhaestCommented:
How to include External css file in Mobile Application
http://forums.asp.net/t/1357842.aspx
0
 
mkdev2009Author Commented:
I have created an external style sheet in mobile User Control. I include the style sheet by dragging the .ascx file into the WAP page.

However, i this error:
 ---------------------------------------------------------------------------------------------------------------------------
"Style not found: style1
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Exception: Style not found: style1"
----------------------------------------------------------------------------------------------------------------------------

Below are my code :
----------------------------------------------------------------------------------------------------------------------------
%@ Page Language="C#" AutoEventWireup="true" CodeFile="Reservation1.aspx.cs" Inherits="Reservation_Reservation1" %>

<%@ Register Src="../mStyle.ascx" TagName="mStyle" TagPrefix="uc2" %>

<%@ Register Src="../UserControl/AAUserControl.ascx" TagName="AAUserControl" TagPrefix="uc1" %>
<%@ Register TagPrefix="mobile" Namespace="System.Web.UI.MobileControls" Assembly="System.Web.Mobile" %>



   


   
        &nbsp;mobile.airasia.com  
           
           
         AirAsia Home &nbsp;


------------------------------------------------------------------------------------------------------------------------------

0
 
mkdev2009Author Commented:
This is my content in my ASCX page
------------------------------------------------------------------------------------------------------------------------------
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="mStyle.ascx.cs" Inherits="mStyle" %>
<%@ Register TagPrefix="mobile" Namespace="System.Web.UI.MobileControls" Assembly="System.Web.Mobile" %>
  <mobile:StyleSheet Runat="server" ID = "CSS">
       <mobile:Style name ="style1" Font-Name ="Arial" BackColor= "#3399ff"  Font-Size="Large" />
   </mobile:StyleSheet>
0
 
mkdev2009Author Commented:
any one know why i get this error?

Style not found: style1
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Exception: Style not found: style1"
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now