473,569 Members | 2,352 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VS.NET designer removes runat='server' attribute in <title>

Some days ago I asked this forum whether it is possible to set up the <title> from the code-behind. A couple of poeple helped me and in fact it is quite ease:
a) change the HTML, e.g.:
<title id="titAV0010" runat="server"> </title>
b) define the field as GenericControl:
protected System.Web.UI.H tmlControls.Htm lGenericControl titAV0010;
c) change modifying the innerText property:
titAV0010.Inner Text = rm.GetString("A V0010.Title");

This works fine, but the pitty is that from time to time VS.NET just removes the runalt="server" attribute from the <title> tag - it looks like a bug of the Designer.
Is there a workaround to this ?
Nov 18 '05 #1
1 1193
This is huge pain.
It is a very well known bug.

I ended up inheriting from Page and adding that section to my base class in
code.
Then you can set properties and not worry about the designer messing up that
part of the page.

This problem is fixed in 2005 but will not be addressed in 2003. It is too
big of a design change.
Many people NEVER switch from HTML view to Design once the have dropped
object on the initial page design.
They just do everything in HTML. Others use Dreamweaver so that when the
designer makes a mess of your HTML, you can restore it.
--
Joe Fallon


"Carlo Marchesoni" <Carlo Ma********@disc ussions.microso ft.com> wrote in
message news:EB******** *************** ***********@mic rosoft.com...
Some days ago I asked this forum whether it is possible to set up the <title> from the code-behind. A couple of poeple helped me and in fact it is
quite ease: a) change the HTML, e.g.:
<title id="titAV0010" runat="server"> </title>
b) define the field as GenericControl:
protected System.Web.UI.H tmlControls.Htm lGenericControl titAV0010;
c) change modifying the innerText property:
titAV0010.Inner Text = rm.GetString("A V0010.Title");

This works fine, but the pitty is that from time to time VS.NET just removes the runalt="server" attribute from the <title> tag - it looks like a
bug of the Designer. Is there a workaround to this ?

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1396
by: Andreas Klemt | last post by:
Hello, I have in my strHtml a html page. so what is the fastest way (with XML Read?) to get the "myValue" between <title>myValue</title> Thanks, Andreas
6
1931
by: Alex | last post by:
Hi, is it possible to set the title programatically from the code behind page. I placed a literal in the head section of the form and set its text property. it seemed to work bu the literal is not in the <form> section of the page. does this matter or is there a better way to programatically/dynamically set the title of the page.
8
3958
by: DC | last post by:
In HTML page, I put: <html> <head> <title>Article: <asp:Label ID="lblHTMLTitle"></asp:Label> </title> .... In the code behind: ....
5
1584
by: Carlo Marchesoni | last post by:
Is it possible to change the document's title property from code behind (c#) ? I need to build a dynamic title at runtime.
7
1582
by: Brad | last post by:
I'm placing a runat=server attribute on the <title> tag in my pages, so I can read/set the title text in code. The problem is that when I subsequently change the page in design view VS is removing the runat=server from the <title> tag. Unfortunately it does not do it all the time...maybe 50%. Brad
1
1851
by: Alan Silver | last post by:
Hello, I am just experimenting with master pages, and am trying to add a content placeholder in the <head> section, so that individual pages can set their own page title and meta tags. The master page looks like this... <%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
4
13314
by: Alex Maghen | last post by:
I have a master page which contains a general page framework and also contains a <form runat=server> around most of the content of the page. Inside that <form> tag is a ContentPlaceholder. I then create an ASPX which is tied to that MasterPage and in it a put a bunch of form fields and an <asp:Button />. When I try to run the page, I get......
15
1903
by: Steve B | last post by:
Is there a way to manipulate the <TITLEin the csharp code?
5
1243
by: dbuchanan | last post by:
How can a page title be supplied at runtime. It looks to me like it is hard coded, but there must be some way. <head runat="server"> <title>Training</title>
0
7703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7926
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8132
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6286
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5222
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3656
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1226
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
944
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.