master page and theme asp.net with vb.net
DESCRIPTION
ASP.NETTRANSCRIPT
![Page 1: Master page and Theme ASP.NET with VB.NET](https://reader030.vdocuments.us/reader030/viewer/2022012822/5499a512b47959a66e8b4595/html5/thumbnails/1.jpg)
MASTER PAGE
Shyam N. Chawda 07874391191
www.shyamsir.com
![Page 2: Master page and Theme ASP.NET with VB.NET](https://reader030.vdocuments.us/reader030/viewer/2022012822/5499a512b47959a66e8b4595/html5/thumbnails/2.jpg)
MASTER PAGE
.master
.aspx
Shyam N. Chawda 9374928879
![Page 3: Master page and Theme ASP.NET with VB.NET](https://reader030.vdocuments.us/reader030/viewer/2022012822/5499a512b47959a66e8b4595/html5/thumbnails/3.jpg)
MASTER PAGE
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.
![Page 4: Master page and Theme ASP.NET with VB.NET](https://reader030.vdocuments.us/reader030/viewer/2022012822/5499a512b47959a66e8b4595/html5/thumbnails/4.jpg)
CONTENT PAGE
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
![Page 5: Master page and Theme ASP.NET with VB.NET](https://reader030.vdocuments.us/reader030/viewer/2022012822/5499a512b47959a66e8b4595/html5/thumbnails/5.jpg)
Shyam N. Chawda 9374928879Shyam N. Chawda 9374928879
![Page 6: Master page and Theme ASP.NET with VB.NET](https://reader030.vdocuments.us/reader030/viewer/2022012822/5499a512b47959a66e8b4595/html5/thumbnails/6.jpg)
OUTPUT
Shyam N. Chawda 9374928879
![Page 7: Master page and Theme ASP.NET with VB.NET](https://reader030.vdocuments.us/reader030/viewer/2022012822/5499a512b47959a66e8b4595/html5/thumbnails/7.jpg)
ADVANTAGES
Centralize the common
Easy to create one set of controls and code and apply the results to a set of pages.
Shyam N. Chawda 9374928879
![Page 8: Master page and Theme ASP.NET with VB.NET](https://reader030.vdocuments.us/reader030/viewer/2022012822/5499a512b47959a66e8b4595/html5/thumbnails/8.jpg)
TITLEProblem
![Page 9: Master page and Theme ASP.NET with VB.NET](https://reader030.vdocuments.us/reader030/viewer/2022012822/5499a512b47959a66e8b4595/html5/thumbnails/9.jpg)
Shyam N. Chawda 9374928879
FROM CONTENT TO MASTERPAGE
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”
![Page 10: Master page and Theme ASP.NET with VB.NET](https://reader030.vdocuments.us/reader030/viewer/2022012822/5499a512b47959a66e8b4595/html5/thumbnails/10.jpg)
FROM CONTENT TO MASTERPAGE
Change the master page’s control value
Dim txt As TextBox txt = Me.Master.FindControl("txtName") txt.Text = txtFname.Text
Shyam N. Chawda 9374928879
![Page 11: Master page and Theme ASP.NET with VB.NET](https://reader030.vdocuments.us/reader030/viewer/2022012822/5499a512b47959a66e8b4595/html5/thumbnails/11.jpg)
NESTED MASTER PAGE
Shyam N. Chawda 9374928879
![Page 12: Master page and Theme ASP.NET with VB.NET](https://reader030.vdocuments.us/reader030/viewer/2022012822/5499a512b47959a66e8b4595/html5/thumbnails/12.jpg)
NESTED MASTER PAGELarge site might contain an overall master page that defines the look of the site.
Example :
CollegeFacultyStudent
Shyam N. Chawda 9374928879
![Page 13: Master page and Theme ASP.NET with VB.NET](https://reader030.vdocuments.us/reader030/viewer/2022012822/5499a512b47959a66e8b4595/html5/thumbnails/13.jpg)
RUNTIME CHANGEPage_PreInit
Me.MasterPageFile = "MainMasterpage.master"
Shyam N. Chawda 9374928879
![Page 14: Master page and Theme ASP.NET with VB.NET](https://reader030.vdocuments.us/reader030/viewer/2022012822/5499a512b47959a66e8b4595/html5/thumbnails/14.jpg)
THEMEA theme is a collection of property settings that allow you to define the look of pages and controls.
Shyam N. Chawda 9374928879
![Page 15: Master page and Theme ASP.NET with VB.NET](https://reader030.vdocuments.us/reader030/viewer/2022012822/5499a512b47959a66e8b4595/html5/thumbnails/15.jpg)
THEME
Themes are made up of a set of elements:
SkinsCascading style sheets (CSS), images, and other resources.
At a minimum, a theme will contain skins.
Shyam N. Chawda 9374928879
![Page 16: Master page and Theme ASP.NET with VB.NET](https://reader030.vdocuments.us/reader030/viewer/2022012822/5499a512b47959a66e8b4595/html5/thumbnails/16.jpg)
SKIN FILE
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
![Page 17: Master page and Theme ASP.NET with VB.NET](https://reader030.vdocuments.us/reader030/viewer/2022012822/5499a512b47959a66e8b4595/html5/thumbnails/17.jpg)
HOW TO APPLY THEME?
<%@ Page Theme="ThemeName" %>
Shyam N. Chawda 9374928879
![Page 18: Master page and Theme ASP.NET with VB.NET](https://reader030.vdocuments.us/reader030/viewer/2022012822/5499a512b47959a66e8b4595/html5/thumbnails/18.jpg)
HOW TO APPLY THEME?
<configuration> <system.web>
<pages theme="ThemeName" />
</system.web> </configuration>
Shyam N. Chawda 9374928879
![Page 19: Master page and Theme ASP.NET with VB.NET](https://reader030.vdocuments.us/reader030/viewer/2022012822/5499a512b47959a66e8b4595/html5/thumbnails/19.jpg)
TYPES OF SKIN
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
![Page 20: Master page and Theme ASP.NET with VB.NET](https://reader030.vdocuments.us/reader030/viewer/2022012822/5499a512b47959a66e8b4595/html5/thumbnails/20.jpg)
Shyam N. Chawda 9374928879
PROPERTIES FOR THEME
EnableTheming
SkinId
![Page 21: Master page and Theme ASP.NET with VB.NET](https://reader030.vdocuments.us/reader030/viewer/2022012822/5499a512b47959a66e8b4595/html5/thumbnails/21.jpg)
Shyam N. Chawda 9374928879
CSS FILES
In the skin file, u can define only the styles associated with server controls.
What about HTML tags and HTML controls?
CSS
![Page 22: Master page and Theme ASP.NET with VB.NET](https://reader030.vdocuments.us/reader030/viewer/2022012822/5499a512b47959a66e8b4595/html5/thumbnails/22.jpg)
STEPS
Step 1:
Create App_theme folder
Step 2:
Add new CSS
Step 3:
Write down logic
Shyam N. Chawda 9374928879
![Page 23: Master page and Theme ASP.NET with VB.NET](https://reader030.vdocuments.us/reader030/viewer/2022012822/5499a512b47959a66e8b4595/html5/thumbnails/23.jpg)
STEPS
Step 4:Go to .aspx page
Step 5:Apply
<%@ Page StyleSheetTheme="ThemeName" %>
Shyam N. Chawda 9374928879
![Page 24: Master page and Theme ASP.NET with VB.NET](https://reader030.vdocuments.us/reader030/viewer/2022012822/5499a512b47959a66e8b4595/html5/thumbnails/24.jpg)
HOW TO APPLY CSS?
<configuration> <system.web> <pages StyleSheetTheme="Themename" /> </system.web> </configuration>
<%@ Page StyleSheetTheme="ThemeName" %>
![Page 25: Master page and Theme ASP.NET with VB.NET](https://reader030.vdocuments.us/reader030/viewer/2022012822/5499a512b47959a66e8b4595/html5/thumbnails/25.jpg)
RUNTIME
Protected Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreInit
Page.Theme = Request.QueryString("th")
End Sub
![Page 26: Master page and Theme ASP.NET with VB.NET](https://reader030.vdocuments.us/reader030/viewer/2022012822/5499a512b47959a66e8b4595/html5/thumbnails/26.jpg)
THEME
Types of Theme:
PageGlobal
Page for single page , individual for all the pages
Global applied to all the websites on a web server.
Shyam N. Chawda 9374928879
![Page 27: Master page and Theme ASP.NET with VB.NET](https://reader030.vdocuments.us/reader030/viewer/2022012822/5499a512b47959a66e8b4595/html5/thumbnails/27.jpg)
Shyam N. Chawda 07874391191
Thanks
www.shyamsir.com