473,386 Members | 1,754 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Themes & Layout

Sol
Hi Guys,

I'm looking for some advice / guidelines on using Themes with an application
I am working on. The application needs to allow people to customize the
appearance utilizing what I would consider to be a Themeing and Skinning
mechanism. What is critical is that this should be as flexible as possible.

What I would like to do is use the built-in Themeing mechanism to allow the
customization, but as we know, the App_Theme folder cannot contain ASPX or
ASCX files. What I really want is for the Theme to dicatate the layout and
hence have Html code. For example if I have a User Control that looks like
the following:

<table>
<tr><td>#ModuleTitle</td></tr>
<tr><asp:datagrid runat="server" id="someGrid" /></td></tr>
</table>

Now I want a user to be able to customize this eg:

<table>
<tr>
<td><img src="leftCorner.jpg"></td>
<td>#ModuleTitle</td>
<td><img src="rightCorner.jpg"></td>
</tr>
<tr>
<td><img src="leftCorner.jpg"></td>
<td><asp:datagrid runat="server" id="someGrid" /></td>
<td><img src="rightCorner.jpg"></td>
</tr>
</table>

Of course, I can dynamically load a user control which is ideal in this
scenario, but it appears as though I will need to create a second Themes
folder to hold all my UserControls. This makes it confusing for someone to
create a new Theme since they would need to add folders and files to both
the App_Theme folder and my own custom Theme folder.

I do want the user to be able to modify / create '.skin' files which will
allow customization of any controls used.

So what recommendations do people have to work around this flaw?
Jan 11 '06 #1
5 1948
Hello,

I don't think users can create skin file in ASP.NET since thie skins is one
kind of "server resources" and the user should not have write permission to
app_theme folder. If you want user be able to customized a web page, I
think there is two approach:

1. Have users selelct between pre-defined themes.
2. Create a User control with functions which can support change UI.

Luke

Jan 12 '06 #2
Sol
OK, I got misunderstood.

I don't mean a user creating skin files, but a client who purchases my
application. There will be some pre-defined skins they can select from, but
more critically they will serve as an example which they can customize.

A good example of what I am trying to acheive is the Theme / Skinning
supported by Telligent CommunityServer or DotNetNuke. Both use ASPX and ASCX
files to control layout and load them dynamically at runtime. Looking at
community server you can see that the ASPX & ASCX files really only have
HTML Layout code with the addition of ASP.Net server controls which could be
skinned seperately. This would be ideal since you would create a single
Theme (ASPX & ASCX files) and multiple skins (CSS & SKIN files) giving a
clean seperation between Themes and Skins when talking about an application.

Hopefully this explains things a bit better.

Sol.
"Luke Zhang [MSFT]" <lu******@online.microsoft.com> wrote in message
news:vF**************@TK2MSFTNGXA02.phx.gbl...
Hello,

I don't think users can create skin file in ASP.NET since thie skins is
one
kind of "server resources" and the user should not have write permission
to
app_theme folder. If you want user be able to customized a web page, I
think there is two approach:

1. Have users selelct between pre-defined themes.
2. Create a User control with functions which can support change UI.

Luke

Jan 12 '06 #3
Hello,

In ASP.NET, a server control can be with same Theme but multiple Skins:

ASP.NET Themes and Skins Overview
http://msdn2.microsoft.com/en-us/library/ykzx33wh.aspx

SkinID property:
http://msdn2.microsoft.com/en-us/lib...ol.skinid.aspx

Luke

Jan 13 '06 #4
Sol
Thanks for the links, but I had already read those, along with almost every
other Theme / Skinning page I could find.

I understand what a .Skin file is and how to apply different skins to server
controls using SkinId.

What I don't understand is how to create use Skins to change the layout.

e.g. I want to be able to use a Theme to be able to output:

<table>
<tr><td>Title</td></tr>
<tr><asp:datagrid runat="server" id="someGrid" /></td></tr>
</table>

And another Theme to output

<table>
<tr>
<td><img src="leftCorner.jpg"></td>
<td>Title</td>
<td><img src="rightCorner.jpg"></td>
</tr>
<tr>
<td><img src="leftCorner.jpg"></td>
<td><asp:datagrid runat="server" id="someGrid" /></td>
<td><img src="rightCorner.jpg"></td>
</tr>
</table>
I hope I'm making more sense?
"Luke Zhang [MSFT]" <lu******@online.microsoft.com> wrote in message
news:kL**************@TK2MSFTNGXA02.phx.gbl...
Hello,

In ASP.NET, a server control can be with same Theme but multiple Skins:

ASP.NET Themes and Skins Overview
http://msdn2.microsoft.com/en-us/library/ykzx33wh.aspx

SkinID property:
http://msdn2.microsoft.com/en-us/lib...ol.skinid.aspx

Luke

Jan 15 '06 #5
I think you may need a customized user control with different skin, which
can render different code acording its property, for example its has a
property named "TitleLeftImage", it can be null or a image file like
"leftCorner.jpg":

<table>
<tr>
<td><img src="leftCorner.jpg"></td>
<td>Title</td>
<td><img src="rightCorner.jpg"></td>
</tr>
<tr>
<td><img src="leftCorner.jpg"></td>
<td><asp:datagrid runat="server" id="someGrid" /></td>
<td><img src="rightCorner.jpg"></td>
</tr>
</table>

Luke
Jan 17 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: RichardF | last post by:
Can anyone get themes to work in asp.net 2.0? The page I have below always looks exactly the same whether I leave out the Theme directive, or whatever valid value I put for the Theme. If I put...
0
by: Robert | last post by:
Hi all, I've got a stylesheet defining 3-column layout using CSS stylesheet. I used to define this stylesheet this way: <link href="Whatever/Style.css" rel="stylesheet" type="text/css" /> and in...
1
by: Seefor | last post by:
I may be missing something, but why aren't master pages part of themes? i.e. why don't they go in the App_Themes or global Themes directory, and be referenced just by name (not full path) in the...
4
by: Sean | last post by:
My experience now working with master pages on and off for 6 months is that they can be very dangerous when working with themes. One example in particular is the changes I made to my banner menu...
1
by: shapper | last post by:
Hello, For the past 4 days I have been articles and books to decide which approach should I use regarding Asp.Net Themes and CSS. One of my bigger problems can be described by the following: ...
11
by: New Bee | last post by:
Hi, I have been looking at Themes and Skins today and now resonably understand how they work at a ground level. But I have a couple of questions. 1. ) StyleSheetTheme I dont understand...
0
by: lew26 | last post by:
I have one page on my site that i do not want to have themes, or stylesheet themes applied to it. How do i disable both. I already know how to disable themes. But how do i disable stylesheetThemes? ...
2
by: Jeff | last post by:
ASP.NET 2.0 I have developed a webpage which are using themes, the webpage contain a dropdownlist where the user can select the theme for the page... This webpage (.aspx) contain a table...
2
by: Clint Chapman | last post by:
When I look at the source html generated from my asp, the links for the css in my theme are duplicated to include files in the _vti_cnf. <link...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.