The document discusses master pages and themes in ASP.NET. It defines master pages as pages that define common layout and controls for other content pages. Content pages are then merged with a master page at runtime. Themes allow defining styles and skins for controls that can be applied globally. Skins define properties for specific controls, while themes can include CSS files to style HTML elements. The document provides steps for creating master pages, applying themes to pages globally or at the page level, and accessing master page controls from content pages.
3. Shyam N. Chawda 9374928879
A page that defines the layout for a
set of pages.
A master page can contain static
text and controls that should appear
on all pages.
Master pages are merged at run time
with content pages that define page-
specific content.
4. A Web page that is configured to be
merged with a master page to create a
complete page.
<%@ Page Language="VB"
MasterPageFile="Master1.master"
Title="Content Page" %>
Shyam N. Chawda 9374928879
9. Shyam N. Chawda 9374928879
Create masterpage
With label give it proper name.
Create .aspx page take one button
To refer master page u can write
Master.Page.Title = “abc”
10. Change the master page’s control value
Dim txt As TextBox
txt = Me.Master.FindControl("txtName")
txt.Text = txtFname.Text
Shyam N. Chawda 9374928879
14. A theme is a collection of property
settings that allow you to define the
look of pages and controls.
Shyam N. Chawda 9374928879
15. Themes are made up of a set of
elements:
Skins
Cascading style sheets (CSS),
images, and other resources.
At a minimum, a theme will contain
skins.
Shyam N. Chawda 9374928879
16. A skin file has the file name
extension .skin and contains
property settings for individual
controls such as Button, Label,
TextBox, or Calendar controls.
Shyam N. Chawda 9374928879
19. A default skin automatically applies to all controls of
the same type when a theme is applied to a page.
A named skin is a control skin with a SkinID property
set.
Named skins do not automatically apply to controls by
type.
Shyam N. Chawda 9374928879
21. Shyam N. Chawda 9374928879
In the skin file, u can define only the
styles associated with server
controls.
What about HTML tags and HTML
controls?
CSS
22. Step 1:
Create App_theme folder
Step 2:
Add new CSS
Step 3:
Write down logic
Shyam N. Chawda 9374928879
23. Step 4:
Go to .aspx page
Step 5:
Apply
<%@ Page StyleSheetTheme="ThemeName" %>
Shyam N. Chawda 9374928879
25. Protected Sub Page_PreInit(ByVal sender As
Object, ByVal e As System.EventArgs) Handles Me.PreInit
Page.Theme = Request.QueryString("th")
End Sub
26. Types of Theme:
Page
Global
Page for single page , individual for all the pages
Global applied to all the websites on a web server.
Shyam N. Chawda 9374928879