Document Title

Results 1 to 2 of 2

Thread: Document Title

  1. #1
    Join Date
    Dec 1969

    Default Document Title

    Is there a way to change the document title through code behind? I have a common page, which the title is change according to database value.. can it be done??<BR><BR>I mean the &#060;title&#062;&#060;/title&#062; in html... pls help..

  2. #2
    Join Date
    Dec 1969

    Default RE: Document Title

    try this:<BR>first replace your command page html title tag with:<BR>&#060;title id="DBTitle" runat="server"&#062;&#060;/title&#062;<BR><BR>Assuming u r using VS.NET (C#), on your code behind add<BR>protected System.Web.UI.HtmlControls.HtmlGenericControl DBTitle;<BR>under your class.<BR><BR>As usual, connect to your database, retrieve your value and assign your value to your title using:<BR>DBTitle.InnerHtml = value from ur db;<BR><BR>it works for me and hope this helps!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts