Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Problem with dynamic tag

Problem with dynamic tag

Scheduled Pinned Locked Moved ASP.NET
sysadminhelp
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    hasanali00
    wrote on last edited by
    #1

    Hi In my Web Form, I have this code: Then in the code-behind file, I set the title of the page dynamically. My problem is that sometimes, my web form deletes runat="server" property from the tag automatically. Because it deletes the <b>runat </b>property, my page stops working. I manually have to add <b>runat="server"</b> into the <title> again. So please tell how I can solve this problem. Thanks </x-turndown>

    E M 2 Replies Last reply
    0
    • H hasanali00

      Hi In my Web Form, I have this code: Then in the code-behind file, I set the title of the page dynamically. My problem is that sometimes, my web form deletes runat="server" property from the tag automatically. Because it deletes the <b>runat </b>property, my page stops working. I manually have to add <b>runat="server"</b> into the <title> again. So please tell how I can solve this problem. Thanks </x-turndown>

      E Offline
      E Offline
      eggsovereasy
      wrote on last edited by
      #2

      Just do this in the code behind: this.Page.Title = "Your Title Here";

      1 Reply Last reply
      0
      • H hasanali00

        Hi In my Web Form, I have this code: Then in the code-behind file, I set the title of the page dynamically. My problem is that sometimes, my web form deletes runat="server" property from the tag automatically. Because it deletes the <b>runat </b>property, my page stops working. I manually have to add <b>runat="server"</b> into the <title> again. So please tell how I can solve this problem. Thanks </x-turndown>

        M Offline
        M Offline
        Mircea Grelus
        wrote on last edited by
        #3

        Or you could do this: <%= pageTitle %> and in your codebehind define pageTitle as protected and assign it in the Page_Load event: pageTitle = "the title of my page"; regards, Mircea Many people spend their life going to sleep when they’re not sleepy and waking up while they still are.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups