Tuesday, August 6, 2013

What is a Theme? How can i apply Themes to an entire application by writing code just at one place in asp.net application?

A professional and unified graphic theme as well as writing the content with a professional tone is really very imperative for businesses and can add value to the business and customers growth. Basically, a theme is a set of property settings that let you to define the appearance of pages and controls and then apply the look consistently across pages in a single Web application or across all the Web applications residing on a server.

Themes are made up of following set of elements

1.  Skins
2.  Cascading Style Sheets (CSS)
3. Images and other Resources

      Themes are defined in special directory named as “App_Themes” in your Website or on your Web server. This folder contain subfolders consist of files (such as .skin, .css and image files) that defines the appearance of web pages and controls.

Themes can be applied to a page, a web site, or globally to all the websites. Setting a theme at the Web site level applies styles and skins to all the pages and controls used in the website unless you override a theme for an individual page or control. Setting a theme at the page level applies styles and skins to that page and all its controls only.

Here are the possible ways to apply themes in asp.net:

1. In the application's Web.config file, set the <pages> element to the name of the theme, either a global theme or a page theme as shown in the following example:

<configuration>
<system.web>
<pages theme=”Write your theme name here” />
</system.web>
</configuration>

A theme setting in the Web.config file applies to all ASP.NET Web pages in that application. Theme settings in the Web.config file follow normal configuration hierarchy conventions.

2. You can set theme as a style sheet theme as given in below example:

<configuration>
<system.web>
<pages styleSheetTheme =”Write your theme name here” />
</system.web>
</configuration>

3. You can also apply a theme to an individual page. For that, set the Theme or StyleSheetTheme attribute of the @ Page directive to the name of the theme of your choice as shown in the following example:

<%@ Page Theme="ThemeName" %>
<%@ Page StyleSheetTheme="ThemeName" %>

I hope this will help you!

7 comments:

  1. Wow that was strange. I just wrote an extremely long comment but after I clicked submit
    my comment didn't show up. Grrrr... well I'm not writing all
    that over again. Anyways, just wanted to say great blog!


    Feel free to surf to my web-site :: discount savings

    ReplyDelete
  2. Hi I am so glad I found your blog page, I really found
    you by mistake, while I was looking on Aol for something
    else, Regardless I am here now and would just like to say many thanks for a remarkable post and a all round enjoyable blog (I also
    love the theme/design), I don't have time to look over it all at the moment but I have bookmarked it and also added in your RSS feeds, so
    when I have time I will be back to read more, Please do keep up the fantastic
    work.

    Feel free to visit my page; lasertest

    ReplyDelete
  3. Highly energetic post, I liked that a lot.
    Will there be a part 2?

    My web blog ... מנעולן במרכז באזור מעלה אדומים

    ReplyDelete
  4. Herbal remedies have many uses, but relief from stress is one
    of the most common. This helps focus your mental energy while at
    the same time relaxing the rest of your body. Individuals that are mostly suffering from Angular Cheilitis Treatment Stomatitis are the children, young people,
    and the aging population.

    ReplyDelete
  5. Wow, awesome blog layout! How long have you been blogging
    for? you made blogging look easy. The overall look of your website is fantastic, let alone the content!



    My weblog - street play on women issues

    ReplyDelete
  6. Good day! I know this is kinda off topic but I'd figured I'd ask.
    Would you be interested in trading links or maybe guest writing a blog post or vice-versa?

    My blog goes over a lot of the same topics as yours and I feel we could greatly benefit from each other.
    If you're interested feel free to shoot me an email.
    I look forward to hearing from you! Wonderful blog by the way!


    Also visit my web site :: Buy Forza Superdrol Canada

    ReplyDelete
  7. Another option to have a secure home is to change your lock rather than install a
    new. In addition, you might need to have an electronic key replaced and
    a locksmith can also perform this service. Make sure you clean your face thoroughly before moisturizing.


    My blog post; מסגרים תל אביב

    ReplyDelete