Screwing up my HTML

Discussion in 'ASP .Net' started by Chris, Oct 22, 2003.

  1. Chris

    Chris Guest

    This is one of those things that is really bugging me.

    I have a big form (lots and lots of textboxes). I know it isn't the
    greatest design, but thats besides the point....

    So when I have a Form in IE6 with the readonly property and the
    Disabled attribute:
    <FORM NAME="aForm" id="aForm" READONLY disabled="true">

    The entire form is made readonly when the person loads it. This is
    what I want.

    When I do this on my ASPX page the form is rendered as:
    <FORM NAME="aForm" id="aForm" readonly="" disabled="disabled">


    This does NOT work.
    What gives? Is there no way to tell .NET to leave my HTML alone?
     
    Chris, Oct 22, 2003
    #1
    1. Advertising

  2. Chris

    Oliver Guest

    This is strange since all HTML is interested in is the bare readonly and
    disabled attributes without any values as in:

    <form id="aForm" disabled runat="server" readonly>

    Not sure why ASP.NET adds values, but I'm surprised that they get in the way
    and prevent the form from being readonly and the controls disabled.



    "Chris" <> wrote in message
    news:...
    This is one of those things that is really bugging me.

    I have a big form (lots and lots of textboxes). I know it isn't the
    greatest design, but thats besides the point....

    So when I have a Form in IE6 with the readonly property and the
    Disabled attribute:
    <FORM NAME="aForm" id="aForm" READONLY disabled="true">

    The entire form is made readonly when the person loads it. This is
    what I want.

    When I do this on my ASPX page the form is rendered as:
    <FORM NAME="aForm" id="aForm" readonly="" disabled="disabled">


    This does NOT work.
    What gives? Is there no way to tell .NET to leave my HTML alone?
     
    Oliver, Oct 23, 2003
    #2
    1. Advertising

  3. Chris

    Jalil Vaidya Guest

    You can disable HTML correction in VS.NET from Tools->Options->Text
    Editor->HTML/XML->Format. Uncheck the two checkboxes under Apply
    Automatic Formatting.

    Jalil Vaidya

    Chris wrote:

    > This is one of those things that is really bugging me.
    >
    > I have a big form (lots and lots of textboxes). I know it isn't the
    > greatest design, but thats besides the point....
    >
    > So when I have a Form in IE6 with the readonly property and the
    > Disabled attribute:
    > <FORM NAME="aForm" id="aForm" READONLY disabled="true">
    >
    > The entire form is made readonly when the person loads it. This is
    > what I want.
    >
    > When I do this on my ASPX page the form is rendered as:
    > <FORM NAME="aForm" id="aForm" readonly="" disabled="disabled">
    >
    >
    > This does NOT work.
    > What gives? Is there no way to tell .NET to leave my HTML alone?
     
    Jalil Vaidya, Oct 23, 2003
    #3
  4. Chris

    Chris Guest

    Jalil,

    It isn't actually the IDE that is making these changes.

    The HTML looks fine in Visual Studio, or if I open it in a text editor
    it is just fine.

    The problem is that when I browse the page, the ASP.NET engine CHANGES
    the html that I have before sending it to the browser.

    The ASPX page has:
    <form id="Form1" method="post" runat="server" READONLY
    disabled="true">

    When you view that page in a browser, you get:
    <form name="Form1" method="post" action="NewsArticleDetail.aspx"
    id="Form1" READONLY="" disabled="disabled">




    READONLY is not the same as READONLY=""



    disabled="true" is not the same as disabled="disabled"



    kinda sucks







    Jalil Vaidya <> wrote in message news:<>...
    > You can disable HTML correction in VS.NET from Tools->Options->Text
    > Editor->HTML/XML->Format. Uncheck the two checkboxes under Apply
    > Automatic Formatting.
    >
    > Jalil Vaidya
    >
    > Chris wrote:
    >
    > > This is one of those things that is really bugging me.
    > >
    > > I have a big form (lots and lots of textboxes). I know it isn't the
    > > greatest design, but thats besides the point....
    > >
    > > So when I have a Form in IE6 with the readonly property and the
    > > Disabled attribute:
    > > <FORM NAME="aForm" id="aForm" READONLY disabled="true">
    > >
    > > The entire form is made readonly when the person loads it. This is
    > > what I want.
    > >
    > > When I do this on my ASPX page the form is rendered as:
    > > <FORM NAME="aForm" id="aForm" readonly="" disabled="disabled">
    > >
    > >
    > > This does NOT work.
    > > What gives? Is there no way to tell .NET to leave my HTML alone?
     
    Chris, Nov 5, 2003
    #4
    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. Darrel
    Replies:
    0
    Views:
    1,039
    Darrel
    Dec 28, 2004
  2. =?iso-8859-1?Q?Jos=E9_Rui_Faustino_de_Sousa?=

    PyNumber_Int screwing Object.

    =?iso-8859-1?Q?Jos=E9_Rui_Faustino_de_Sousa?=, Oct 6, 2003, in forum: Python
    Replies:
    0
    Views:
    430
    =?iso-8859-1?Q?Jos=E9_Rui_Faustino_de_Sousa?=
    Oct 6, 2003
  3. Tim Peters

    RE: PyNumber_Int screwing Object.

    Tim Peters, Oct 6, 2003, in forum: Python
    Replies:
    2
    Views:
    328
    =?iso-8859-1?Q?Jos=E9_Rui_Faustino_de_Sousa?=
    Oct 6, 2003
  4. Tim Peters

    RE: PyNumber_Int screwing Object.

    Tim Peters, Oct 7, 2003, in forum: Python
    Replies:
    1
    Views:
    314
    Bengt Richter
    Oct 7, 2003
  5. Daniel Kramer

    string parsing screwing up on large files?

    Daniel Kramer, Dec 20, 2003, in forum: Python
    Replies:
    2
    Views:
    322
    Bengt Richter
    Dec 20, 2003
Loading...

Share This Page