C# - What Is CSS, Themes And Skin In .Net
Jan 6, 2011I am a beginner in ASP.Net. I want to know what is CSS, Themes and Skin in ASP.Net? and How to create and use these things in ASP.Net? Please explain with simple example.
View 1 RepliesI am a beginner in ASP.Net. I want to know what is CSS, Themes and Skin in ASP.Net? and How to create and use these things in ASP.Net? Please explain with simple example.
View 1 RepliesWe have a legacy app with multiple asp.net themes. Each theme have a .skin file. Each skin file is almost identical except for some things. The files share a lot of similarities. Is it possible to share a common .skin file across themes?
View 1 RepliesIn the Telerik.Web.UI.xml file I found this entry
<member name="P:Telerik.Web.UI.RadDataBoundControl.Skin">
<summary>Gets or sets the skin name for the control user interface.</summary>
<value>A string containing the skin name for the control user interface. The default is string.Empty.</value>
<remarks>
<para>
If this property is not set, the control will render using the skin named "Default".
If EnableEmbeddedSkins is set to false, the control will not render skin.
</para>
</remarks>
</member>
that says RadControls are using skin named Default..Now what if I want it to be not default ..what if I want it to be some CustomSkin to be rendered and not default skin?? Where do I need to set the value for the skin I wanna use? I don't know much of XML..so asking
Whats this xml file for anyway? Only describing stuff? What IS the purpose of this xml file??
[EDIT]
Tried setting Skin globally in webconfig.xml as mentioned in telerik's website as follows:-
<add key="Telerik.EnableEmbeddedSkins" value="true" />
<add key="Telerik.EnableEmbeddedBaseStylesheet" value="true" />
<add key="Telerik.RadEditor.Skin" value="CustomSkin" />
This is not making any diff! is using default file only.
my asp.net web application is good looking in IE whereas in Mozilla, the css/skin i've used doesn't work. what's the solution
View 3 RepliesI have a project where i want (almost) all controls of the same type to also have an extender set with the SAME properties - is there some way to skin the existence of that extender instead of placing it on each and every control?
View 1 RepliesI want to change the skin for a gridview using code behind, so that it has a different skin when view on mobile devices. How do I do this?
I have tried this but it doesn't work:
if (Request.Browser.IsMobileDevice)
{
gvContacts.SkinID = "NPTResults_m";
}
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
<link href="Skins/CustomSkin/Editor.Default.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<telerik:RadEditor ToolbarMode="Default"
ID="editor1" runat="server" EnableEmbeddedSkins="false" Skin="CustomSkin">
</telerik:RadEditor>
</asp:Content>
RADEditor on my page was inheriting Master Page's CSS properties so followed this tutorial to create custom skin..now what I did was...I simply copied the Folder named "Default" under Skins folder and renamed it to "CustomSkin" and added it like in the code above ..thot it would work but it didn't coz now I don't see border on my RADEditor...why is that ? Also it is STILL inheriting properties from Master page's CSS file :(
I didn't change name of any of the CSS files inside "CustomSkin" folder...Also when I added the following inside "telerik:RadEditor"...still problem persisting..
<CssFiles>
<telerik:EditorCssFile Value="~/Skins/CustomSkin/Editor.Default.css" />
<telerik:EditorCssFile Value="~/Skins/CustomSkin/Window.Default.css" />
<telerik:EditorCssFile Value="~/Skins/CustomSkin/ToolBar.Default.css" />
</CssFiles>
Quite some time ago I used an old version of the AjaxToolkit. Now I decided to load the newest version.
Below code shows me the HEADER and CONTENT ok, HOWEVER:it seems that no theme (skin, CSS) areused / found / recognisedwhen running the page I see the header and content I even can click the header and the text fades away correctly!I used drag/drop from the toolbox in VS2008
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MyEvents.aspx.cs" Inherits="MyEvents" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI" TagPrefix="asp" %>
[code]....
What is the main difference between .skin and .css in asp.net?.skin is new enhancement of IDE. I have been working with .css. What is available in .skin that is not to .css
View 2 RepliesIf I am assigning a paricular css class to a control ,it hnherits the class but if i simultaneously give the skin id to the same control then this skin ID overrides the CSS class.
Why this is happening?Now if I am using !important in the css stylesheets then css class property is inherited by the control.
.lblUserName1
{
width: 400px;
line-height: 32px;
color: Red !important;
font-weight: bold;
background-color: #669999;
}
i am using skin for text boxes , for one perticular text box i don't wont any skin properties how can i disable
following code methods i used
i sets globally in master page
<%@ Master EnableTheming="true" Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs"
Inherits="MasterPage" %>
in skinFile.skin i used this tag
<asp:TextBox runat="server" BorderColor="#6BB7E1" BorderStyle="Solid" BorderWidth="1px"></asp:TextBox>
for disable one text box i followed this method
<asp:TextBox ID="tb_search" runat="server" BorderStyle="None" Width="235px"
EnableTheming="False"></asp:TextBox>
with this, skin style not appeared in disable mode in all mozilla, and chorme
but IE 6 still i am getting skin properties , how can disable skin properties for IE 6 browser
i installed dotnetnuke in my system, installation is completed successfully, now i want to change skin settings according to my requirement like changing colors,font,logs like that can u help me how can i do this in dotnetnuke.
View 1 RepliesI implemented a lot of ASP.NET controls inheriting controls from existing control library. My problem is that I can't use existing library themes/ skin files for skinning my controls. Is there a way to use existing skin files in inherited controls? Changing parts or renaming skin files is not an option. I could read data from skin file and then apply it to control programatically. Is there some kind of API for reading skin files?
View 1 RepliesWhat is the best practice to apply different themes to different customers with asp.net.
View 4 RepliesI am using the UrlRewriter.NET library to perform URL rewriting. I noticed that themes do not work properly as the browser tries to retrieve the CSS file incorrectly.
The link tag generated by ASP.NET automatically is as follows:
<link href="App_Themes/vertebrata/style.css" type="text/css" rel="stylesheet" />
URL typed into browser: localhost:1708/BloggingEngine/aa Displays fine
URL typed into browser: localhost:1708/BloggingEngine/aa/ Browser does not load the CSS file
I can probably fix the problem by prefixing a "/" before the URL in the href attribute, but this is dynamically generated by ASP.net depending on selected theme and I have no control over it.
How do I get ASP.net to load themes properly?
I have a very simple Skin with the following:
[Code]....
And in my css I have the following:
[Code]....
The Basic Button CSS works in both browsers but my .BsicInput:focus CSS works only in Firefox. Any ideas about what is wrong?
I have four themes: Theme1, Theme2, Theme3, Theme4. Under every theme, it contains a skin file and css file. In every themes, there are some same css elements, skin elements and different css elements, skin elements. How can I put the same css elements, skin elements under one shared thems instead of every themes.
View 2 RepliesI'm in the process of building a webforms site. In the grand tradition of programmers, I have been looking for collections of skins/themes/css for asp.net controls to avoid the work of building them myself.Especially since I'm graphically challenged. I've found numerous sites with templates for drupal, DNN, etc but the only places I've found asp.net control themes/skin/css collections is within commercial component libs that cost more than i'm able to afford.
The absence of these collections is also making me question how I'm building the site since I assume the "theme" sites would be providing these collections if there was a demand.
Can anyone point me to where I can find inexpensive or free asp.net theme/skin collections or give me some pointers about how to build a site without requiring a bunch of work to create them from scratch.
i have master pages set to each page, i want to use skins, but i cannot attach it to master page
do i need to go in every page and set theme there ?
how can i apply it to master page, so that it gets applied to all the pages
i have a asp.net menu in my skin file, i gave the menuitem a class :
<StaticMenuItemStyle CssClass="menu_item" />
but there is some conditions where i want the item cssclass to be "menu_item1",is there any possibility to change dynamically the cssclass within a Skin file??
Question: Is it possible to embed .skin files as a resource?
I am creating a library of user controls(grids, buttons, etc.) that are common among all of our web projects. I have included several common javascript files used by the controls by adding them as an embedded resource and registering them as a resource using RegisterClientScriptResource. Everything works great.
However, the last thing I would like to do is embed skin files in this project so that all the controls have the same look. I know I can control look solely with css, but I would like to control some of the other asp attributes as well(ie AllowSorting and AllowPaging attributes of a grid). Is it possible to embed skin files as a resource? Or will each individial project need a copy of the skin file? If anyone could provide insight on how I can go about embedding a skin file..
In firebug under "Style" its showing the css file as follows when I hover mouse over RadEditor
"http://localhost/myWeb/WebResource.axd?d=WSPnt1ffDvgb4bj2Ii5nA4MecfZdsnZ0wvgLy3HVcihYTy2nMTq7iIu8RlAb7ZMF61e07jisMUNhQZabIxK2kyuxNpeCFqhE3cgnDSm1-Pc1&t=634237829795625000"
In telerik:RadEditor tag ..I haven't specified any property such as Skin=Skin1 or whatever..so its using some default skin...In the Skins folder..there's this folder named "Default" that's got images and css files...Is "Default" what it's using ??? now when I change something in the Default skin's CSS file...changes do not reflect on my page...so how do I find out which css its using ??can't figure out nothing from a path like that
[edit]
For this Editor mainly 3 css files are being used namely Editor.Default.css,Window.Default.css and ToolBar.Default.css..now when I view page source , I can't find refernce to any of these 3 css files...Also in firebug , under "Styles" where that weird css path is shown, its displaying CSS classes like .reToolbar , etc...now ALL the Skins' CSS files have got this CSS class ".reToolbar" ..so how to find out which CSS file's class is this particular ".reToolbar class" ??
tried uploading themes,skins,css and master page files to be used by a page where it dynamically sets all of these at runtime? Also, if possible skin to contain other than styles like web layout (normally set in a master page)...
View 7 RepliesI am using Theme and skin to my current project.
I would like to know, can
1) Theme applied to asp:panel ?
2) Theme applied to AJAX update panel ?
Say I am creating a Textbox in the codebehind of a page like this:
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
TextBox test = new TextBox();
test.SkinkId = "MySkin";
placeHolder.Controls.Add(test);
}
and in my skin file I have this:
<asp:TextBox
runat="server"
SkinId = "MySkin"
Width="400"
/>
Why is the skin not beeing applied to the control. If i declare the control in my aspx page it works ok, but if I try to do it programatically it does not work...