Problem with dynamic tag
-
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>
-
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>
Just do this in the code behind:
this.Page.Title = "Your Title Here";
-
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>
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.