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

G

Guest

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.HtmlControls.HtmlGenericControl titAV0010;
c) change modifying the innerText property:
titAV0010.InnerText = rm.GetString("AV0010.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 ?
 
J

Joe Fallon

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 said:
Some days ago I asked this forum whether it is possible to set up the
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top