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.
mkdev2009Asked:
Who is Participating?
 
myderrickConnect With a Mentor Commented:
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
 
DhaestConnect With a Mentor Commented:
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
 
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
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.