Tutorials
Resources
Forum
Reviews
Communities
Interview
Jobs
Projects
Training
Your
Ad
Here
Silverlight Games
|
Mentor
|
Code Converter
|
Articles
|
Code Factory
|
Computer Jokes
|
Members
|
Peer Appraisal
|
IT Companies
|
Bookmarks
|
Polls
|
Revenue Sharing
|
Lobby
|
Gift Shop
|
Prizes & Awards
My Profile
Sign In
Register
AdSense Revenue
Active Members
Today
Nikhil Gaur
(70)
Shameer
(34)
Nadheera V
(30)
Last 7 Days
Nikhil Gaur
(621)
Anil Kumar ...
(582)
Abhisek Panda
(445)
more...
Resources
»
Articles
»
ASP.NET/Web Applications
»
Themes and Skins
Posted Date: 06 Sep 2008
Resource Type:
Articles
Category:
ASP.NET/Web Applications
Author:
D.Jeya kumar(JK)
Member Level:
Diamond
Rating:
Points
: 10
Theme and skins in asp.net
Theme is a collection of properties of pages, CSS (cascading style sheets), Skins etc. We can define the properties of the page controls in a skin file and then we can refer the properties for the page web server controls. A theme can be used for the web server controls in order to make the consistent look and feel across your web application.
In earlier version of the Asp.net 1.0 or 1.1 we need to create a Cascading style sheets and then refer we can refer the CSS in a page.
A skin is file with Extension as .skin and it contains the properties for a web server control that is used in web sites.
The advantage of using the Skin file we can define the different properties of a web server control and we can apply to all the controls in a page to give a consistent look to the pages.
Difference between a skin and CSS
Cascading style sheet and the skin are similar. That can be used for applying the properties to all the controls in a page that are defined in a skin or css.
Theme can be not only used for the style attributes it can be use to define a template for a control.
Themes include Graphics, template for controls
Only one theme can be applied to a page. We cannot include any number for CSS file in a page.
Steps to create and include a theme in a page
Create a folder App_themes in your solution and then In Solution Explorer, right-click the name of your theme folder and then click add new item and then select the skin file.
Then we can add the define the properties of the then like below
Here the Class =”asp_label” is defined in a class file
<asp:Label runat="server" class="asp_Label"/>
<asp:TextBox runat="server" class="asp_TextBox"/>
<asp:TreeView runat="server" CollapseImageUrl="images/new_clp.gif" ExpandImageUrl="images/New_exp.gif" />
Now we had defined the Properties for the controls
We need to include the theme file in the page like below
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Home.aspx.cs"
Theme="Mytheme" Inherits="_Default" %>
Now all the labels and textbox in this page will have the common property which will be defined in the Skin and class file
Attachments
Download the document for Skins and themes
(20708-6259-Theme and skins in asp.doc)
Responses
No responses found. Be the first to respond and make money from
revenue sharing program
.
Feedbacks
Popular Tags
What are tags ?
Search Tags
Sign In
to add tags.
Themes
.
Skins and themes
.
Skin and Css
.
Skin
.
Advantage of using skin
.
Post Feedback
This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must
Sign In
to post a response.
Next Resource:
DataReader vs. DataSet
Previous Resource:
How to Handle MouseEvents using c# dot net
Return to Discussion Resource Index
Post New Resource
Category:
ASP.NET/Web Applications
Post resources and
earn money
!
Related Resources
DataReader vs. DataSet
Printing contents of controls in .Net
DropdownList's selected text into TextBox
Javascript ToolTip
How to open word,excel file on a new web page
Records from Datagrid to Excel sheet
dotNet Slackers
About Us
Contact Us
Privacy Policy
Terms Of Use