Page titles

G

Gilgamesh

Hi there,
I've got a dozen pages in my asp.net application, and I want all the pages
to read their titles from an XML file. I tried to implement is using XSL but
haven't had any luck. is there a way to do this?

Thanks,
Gilgamesh
 
S

Steve C. Orr [MVP, MCSD]

The .NET framework has rich XML capabilities built in. There are a variety
of ways you can load data from an XML file.
Once you've done that, you can set the page title through code by adding the
runat="server" attribute to your title tag.
Here's a good example:
http://www.aspalliance.com/kenc/faq5.aspx
 
G

Gilgamesh

This is great, I appreciate it. To take it one step further, how do I read
page hedaers in the same fashion? I want each page to have a different
header on the top which might be different from page titile.


Thanks,
G.
 
S

Steve C. Orr [MVP, MCSD]

You could use a similar approach for the other header items.

Or you might choose to make your header into a web user control.
Here's more info:
http://msdn.microsoft.com/library/d...n/html/vbconintroductiontowebusercontrols.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vboriwebusercontrols.asp
http://msdn.microsoft.com/library/d...l/vbconWebUserControlsVsCustomWebControls.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top