asp.net templates!

  • Thread starter Thread starter hansiman
  • Start date Start date
H

hansiman

in my asp.net project I find myself adding new .aspx files and adding
stylesheet and javascript links in the header part.

Is there a centralized way / method to ensure that a .aspx file has
the correct stylesheet and javascript links in the header part?

How do you do it?
 
Hi,

One of the ways to do that is using an asp.net literal control.

Here is a sample.

aspx file

<html>
<head>
<asp:Literal runat="server" id="ltlTitle" />
</head>
<body>
test
</body>
</html>

in the aspx.cs file

protected Literal ltlTitle;

ltlTitle.Text = "<title>this is the title of my form</title>";

Hope this helps!
Franck


| in my asp.net project I find myself adding new .aspx files and adding
| stylesheet and javascript links in the header part.
|
| Is there a centralized way / method to ensure that a .aspx file has
| the correct stylesheet and javascript links in the header part?
|
| How do you do it?
|
 
Back
Top