Escolar Documentos
Profissional Documentos
Cultura Documentos
PRACTICAL NO. 4
AIM: Design a Web Form and apply different styles and themes using CSS
3. Inside any element, again right click and choose Build Style.. A dialog opens as shown below. Use these
options to create stylesheet.
ICLES Motilal Jhunjhunwala College of Arts, Commerce & Science
Once the stylesheet is ready, open toy webform in source mode and add this line inside <head></head> tag
<link href="StyleSheet.css" rel="stylesheet" type="text/css" />
OR Simply drag your stylesheet on your form
STYLESHEET.CSS CODE :
body
{
font-family: Aharoni;
font-size: medium;
font-weight: bolder;
font-style: oblique;
font-variant: normal;
text-transform: capitalize;
color: #FF00FF;
text-decoration: underline;
}
.mynewStyle
{
border-style: dotted;
font-family: 'Arial Black';
font-weight: bold;
color: #00FF00;
font-style: oblique;
}
.my2ndNewStyle
{
font-family: Algerian;
font-weight: normal;
}
.my3rdNewStyle
{
font-family: Arial;
font-size: medium;
font-weight: bold;
font-style: italic;
color: #800000;
text-decoration: underline;
}
a:link
{
color: #FF0000;
}
a:visited
{
color: #008000;
}
ICLES Motilal Jhunjhunwala College of Arts, Commerce & Science
CREATING A PAGE THEME:
1) In Solution Explorer, right-click the name of the Web site for which you want to create a page theme, and then
click Add ASP.NET Folder.
2) Click Theme.
If the App_Themes folder does not already exist, Visual Web Developer creates it. Visual Web Developer then
creates a new folder for the theme as a child folder of the App_Themes folder.
3) Type a name for the new folder.
The name of this folder is also the name of the page theme. For example, if you create a folder named
\App_Themes\FirstTheme, the name of your theme is FirstTheme.
4) Add files to your new folder for control skins, style sheets, and images that make up the theme.
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<link href="StyleSheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<div>
Here is Body tag formatting
<br />
<br />
<asp:Label ID="Label1" runat="server" Text="This is Label with cssClass=my3rdNewStyle"
CssClass="my3rdNewStyle"></asp:Label>
<br />
<br />
<asp:Label ID="Label2" runat="server" Text="This is Label with cssClass=my2ndNewStyle"
CssClass="my2ndNewStyle"></asp:Label>
<br />
<br />
<asp:Label ID="Label3" runat="server" Text="This is Label with cssClass=myNewStyle"
CssClass="myNewStyle"></asp:Label>
<br />
<br />
<asp:LinkButton ID="LinkButton1" runat="server">icl college</asp:LinkButton>
<br />
<br />
ICLES Motilal Jhunjhunwala College of Arts, Commerce & Science
<asp:Button ID="Button1" runat="server" Text="Submit" />
</div>
</form>
</body>
</html>
OUTPUT SCREEN: