Asp.net Replace item [%ME%]?

Discussion in 'Digital Media' started by webgye, Apr 24, 2008.

  1. webgye Guest

    webgye
    I am writing a simple CMS system (Please dont refer me to other CMS systems)

    I want to put most of my data in a database such as Page titles...

    So I can use <head>[%TITLE%]</head> on my template page.

    Here is my delima... What is that called? How do I replace the [%TITLE%] in my code behind?

    If someone can show me a VB tutorial or give me a relace explination I would be forever greatful!

    Thanks in advance!

    Aaron
  2. pluraldon Guest

    pluraldon
    Here you go! Hope this helps:

    <title><asp:Literal id="pageTitle" runat="server" /></title>

    In your code behind PageLoad code
    Public Sub Page_Load(ByVal Sender As Object, ByVal E As EventArgs)

    Add a line:

    pageTitle.Text = <your title> 'Reference your code behind here.

Share This Page