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

Discussion in 'ASP .Net' started by =?Utf-8?B?Q2FybG8gTWFyY2hlc29uaQ==?=, Jul 14, 2004.

  1. 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 ?
     
    =?Utf-8?B?Q2FybG8gTWFyY2hlc29uaQ==?=, Jul 14, 2004
    #1
    1. Advertising

  2. =?Utf-8?B?Q2FybG8gTWFyY2hlc29uaQ==?=

    Joe Fallon Guest

    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 > wrote in
    message news:...
    > 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 ?
    >
    >
     
    Joe Fallon, Jul 15, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ronald Colijn
    Replies:
    1
    Views:
    548
    Martin Eklund
    Nov 27, 2003
  2. Matt
    Replies:
    5
    Views:
    624
    Shaul Feldman
    May 30, 2004
  3. Matt

    runat="server" attribute

    Matt, May 29, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    478
    Rocky Moore
    May 30, 2004
  4. Brad
    Replies:
    7
    Views:
    496
    Joe Fallon
    Jul 24, 2004
  5. rote
    Replies:
    5
    Views:
    930
Loading...

Share This Page