Ehsan Tavakoli

Writing About .NET Programming and other stuff

Browser-Specific Master Pages

with 5 comments


When you are trying to create a master page for your website, you may just wonder how can you make them that every user with any browser can call your pages up. No matter they are using IE or Firefox or even Opera on their tiny PocketPC.

You can easily design different pages for different container. How? By adding an attribute into master page property.

<%@ Page language="C#" MasterPageFile="~/Test.master"
      Mozilla:MasterPageFile="~/TestMozilla.master"
      Opera:MasterPageFile="~/TestOpera.master" %>
....

You can find a list of available browsers on the production server where the application will be hosted at C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG\Browsers\

  • avantgo
  • cassio
  • Default
  • docomo
  • ericsson
  • EZWap
  • gateway
  • generic
  • goAmerica
  • ie
  • Jataayu
  • jphone
  • legend
  • MME
  • mozilla
  • netscape
  • nokia
  • openwave
  • opera
  • palm
  • panasonic
  • pie
  • webtv
  • winwap
  • xiino
Advertisements

Written by Ehsan Tavakoli

February 20, 2010 at 12:36 pm

5 Responses

Subscribe to comments with RSS.

  1. Oh Ehsan greate blog and great posts, keep it guy (ata)

    Anonymous

    February 21, 2010 at 7:46 am

    • Thanks dear Ata!

      Thanks so much for setting up my new website…

      Ehsan

      February 22, 2010 at 12:13 am

  2. Hi,Congratulations! Keep going, and I think your posts need a little more detail explanation. I mean you may provide a little in depth description of your code.Although I don't like .NET, I will follow your blog.Good luck

    Behrang

    February 21, 2010 at 11:32 am

    • Thanks Behrang for your comment.. I do agree with you. I’ll keep it in my mind… See you

      Ehsan

      February 22, 2010 at 12:28 am

      • WordPress is the best weblog software. Way better than Blogger. This new theme is better too. Also check tumblr.com. You may find it more useful.

        Also I cannot find RSS links in my browser’s address bar. I think you have to enable this feature.

        Behrang

        February 22, 2010 at 4:02 am


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: