Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET Web Forms: Master Page & CSS File [closed]

I have a project (Web Application) that I need to implement with Web Forms. I have already prepared the design for the website and I will use one of the CSS templates that I already developed. In this case:

  1. Should I use a master page?
  2. Is there any relationship between the master page and the CSS file? If yes, how should I define master page with the CSS file?

By the way, the CSS file is a ready template.

like image 911
Mohammed Ali Avatar asked Sep 16 '11 12:09

Mohammed Ali


1 Answers

  1. I would highly recommend using a master page. It gives you the ability to have one consistent look across all your pages. Also if you decide to change the layout your only changing one file!

  2. Simply reference the CSS file in your master page and it will be applied to every page the master page is used on. Something like <link href="~/styles/Style.css" rel="stylesheet" type="text/css" />

It should be noted that you can also have more then one master page. Visual studio also allows you to create pages and select the master page, it's one of the other options when adding an item.

like image 124
Gage Avatar answered Oct 29 '22 22:10

Gage