How to use Theme and Skin in Textbox control in ASP.NET

Hi Here we learn to use Theme and skin in ASP.Net TextBox Example.

Theme is used to design the ASP.NET serer control.
First create the Theme for each control.

Example: – IF we create a theme for TextBox control, apply that theme on webform so all the TextBot control affected that theme on same webform.

STEP 1 :-

Create a Theme, Just right click on the Project title–> Add ASP.Net Folder –>Theme

How to use Theme and skin in ASP.Net - ASP.Net Textbox Example

How to use Theme and skin in ASP.Net – ASP.Net Textbox Example

STEP 2 :- After Adding Theme Folder Add New Item in Theme Folder –> Skin File.

How to use Theme and skin in ASP.Net - ASP.Net Textbox Example

How to use Theme and skin in ASP.Net – ASP.Net Textbox Example

STEP 3 :- Add the Skin File.
- Write Below code in Skin File for TextBox Style

<asp:TextBox runat=”server” BackColor=”#FFFFC0″ Font-Bold=”True” ForeColor=”Red”></asp:TextBox>

How to use Theme and skin in ASP.Net - ASP.Net Textbox Example

How to use Theme and skin in ASP.Net – ASP.Net Textbox Example

STEP 4 : Now apply the Theme file on all webform by writing below line on HTML coding:

<%@ Page Language=”C#” AutoEventWireup=”true” CodeFile=”txttheme.aspx.cs” Inherits=”txttheme” Theme=”Theme1″ %>

- In below figure we can see the output of Theme in .net
- all the Textbox style change on runtime.

How to use Theme and skin in ASP.Net - ASP.Net Textbox Example

How to use Theme and skin in ASP.Net – ASP.Net Textbox Example

In above ASP.NET Textbox Example we learn to apply theme and skin File in ASP.NET C#.

- Hope you enjoy this ASP.Net Tutorials.

Leave a Reply

Your email address will not be published. Required fields are marked *

3 + 7 =


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">