xhtmlConformance mode="Strict"

M

MCM

I have the following line in my web.config file:

<xhtmlConformance mode="Strict" />

however the form element is still rendering with the "name" attribute. I
think a potential problem is that I am using precompilation for the site. Is
there a way for me to have the precompiler use strict mode?
 
P

Patrice

Hi,

You have just updated the web config file ? Or you also recompiled the site
?

Not sure for this one but in some cases, settings stored in web.config are
used at compile time to build the pages so if your site is precompiled with
updates disallowed, you have to recompile the site...

If I remember I heard also about some other issues but not sure if having
still the name attribute is one of them (I made a quick search, actually it
seems to be Ajax issues with the "legacy" mode)...
 
M

MCM

You have just updated the web config file ? Or you also recompiled the site

I updated web.config, then recompiled the site.
Not sure for this one but in some cases, settings stored in web.config are
used at compile time to build the pages so if your site is precompiled with
updates disallowed, you have to recompile the site...

I do have updates disallowed, but I recompiled.
 
B

bruce barker

the browser detection logic (HttpBrowserCapabilities) needs to report
W3CDOMVersion.Major as greater > 0.

check you browser version (agent string), and the browserCaps (in
config) is setting this for your browser.

-- bruce (sqlwork.com)
 
A

Allen Chen [MSFT]

Hi,
I have the following line in my web.config file:
<xhtmlConformance mode="Strict" />
however the form element is still rendering with the "name" attribute. I
think a potential problem is that I am using precompilation for the site. Is
there a way for me to have the precompiler use strict mode?

I cannot reproduce this issue, even using precompiled web site. Are you
sure it only happens when it's a precompiled web site? Does it happen if
you create a new ASP.NET Web Application? Is it possible that you're using
page cache that causes this issue?

Regards,
Allen Chen
Microsoft Online Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
M

MCM

I am not caching anything. I can e-mail you my web.config file if that is
helpful.

Also, to be more clear - I am using a "Web Deployment Project" to do the
precompilation. I can also e-mail you the settings I use for that as well.

My website is an "ASP.NET Web Application" using VB and .NET 3.5.
 
A

Allen Chen [MSFT]

Hi Alex,
I am not caching anything. I can e-mail you my web.config file if that is
helpful.

Then could you try bruce's suggestion to check this value (please set a
breakpoint in Page_Load and check it in the watch window):

Request.Browser.W3CDomVersion

Is it 0? If so it'll still render the name attribute even though
xhtmlConformance is set as strict. See below logic:

if (writer.IsValidFormAttribute("name"))
{
if (((page != null) && (page.RequestInternal != null)) &&
((page.RequestInternal.Browser.W3CDomVersion.Major == 0) ||
(page.XhtmlConformanceMode != XhtmlConformanceMode.Strict)))
{
writer.WriteAttribute("name", this.Name);
}
base.Attributes.Remove("name");
}


If this is the cause, you can add a browserCaps section in web.config to
force web controls render as if the browser supports w3cdomversion 1.0.

http://www.4guysfromrolla.com/demos/printPage.aspx?path=/articles/050504-1.a
spx

Please let me know if it works.

Regards,
Allen Chen
Microsoft Online Support
 
M

MCM

You and Bruce were right about the Dom version. But the broswerCaps section
is not helping. I am getting a value of 1 for the Dom version in all major
browsers - which is good. But I am trying to validate with the w3c validator.
That system is giving me a value of 0 for the Dom. The browserCaps section
isn't changing it.
 
A

Allen Chen [MSFT]

Hi,
You and Bruce were right about the Dom version. But the broswerCaps section
is not helping. I am getting a value of 1 for the Dom version in all major
browsers - which is good. But I am trying to validate with the w3c validator.
That system is giving me a value of 0 for the Dom. The browserCaps section
isn't changing it.

Could you send me a demo that can reproduce this issue? I'll try to see if
there's a way to solve it. My email is (e-mail address removed) update
here after sending the project in case I missed that email.

Regards,
Allen Chen
Microsoft Online Support
 
M

MCM

Don't worry about it. Thanks though.

Allen Chen said:
Hi,


Could you send me a demo that can reproduce this issue? I'll try to see if
there's a way to solve it. My email is (e-mail address removed) update
here after sending the project in case I missed that email.

Regards,
Allen Chen
Microsoft Online Support
 

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

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top