473,385 Members | 1,630 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Screwing up my HTML

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?
Nov 17 '05 #1
3 917
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" <cm**@walshgroup.com> wrote in message
news:44**************************@posting.google.c om...
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?
Nov 17 '05 #2
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?


Nov 17 '05 #3
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 <ja****@mailinator.com> wrote in message news:<uM**************@TK2MSFTNGP09.phx.gbl>...
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?

Nov 17 '05 #4

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

Similar topics

0
by: José Rui Faustino de Sousa | last post by:
Hi! This code snippet is broken in the case that the argument passed is a complex number PyObject* tmp = Py_None; tmp=PyNumber_Int(object); tmp=PyObject_GetAttrString(object,"real");
2
by: AD. | last post by:
Hi all, I'm just playing around with some ideas for cleaning up the HTML/CSS in a web based app of ours. The intention is stop using table layouts, remove all pixel based sizes and...
1
by: The Master | last post by:
For the most part I think I have it rendering correctly on Opera 7.5, Firefox .8, and IE 6 for Windows (the only exception is IE 6 for windows adds an extra space between the Top Nav and the Left...
4
by: Francois Keyeux | last post by:
hello everyone: i have a web site built using vbasic active server scripting running on iis (it works on either iis 50 and 60, but is designed for iis 50) i know how to create a plain text...
0
by: Chris | last post by:
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...
5
by: serge calderara | last post by:
Dear all, I am new in asp.net and prepare myself for exam I still have dificulties to understand the difference between server control and HTML control. Okey things whcih are clear are the fact...
6
by: Guy Macon | last post by:
cwdjrxyz wrote: HTML 5 has solved the above probem. See the following web page: HTML 5, one vocabulary, two serializations http://www.w3.org/QA/2008/01/html5-is-html-and-xml.html
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.