Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Changing VS2005 to generate HTML 4.01/Strict instead of XHTML 1.0

Reply
Thread Tools

Changing VS2005 to generate HTML 4.01/Strict instead of XHTML 1.0

 
 
Rob Roberts
Guest
Posts: n/a
 
      01-20-2006
Is there any way to change VS2005 to generate HTML 4.01/Strict instead of
XHTML 1.0/Transititional? VS2005 puts a DOCTYPE statement specifying XHTML
1.0/Transitional at the top of every new aspx page. Is there any way to
change it to specify an HTML 4.01/Strict DOCTYPE instead?

Thanks in advance,
--Rob Roberts


 
Reply With Quote
 
 
 
 
Teemu Keiski
Guest
Posts: n/a
 
      01-20-2006
Hi,

if legacy rendering similarly to ASP.NET 1.1 would be enough then setting
<xhtmlConformance mode="Legacy"> element in web.config. Otherwise you are
probably looking for developing your own adapter / HtmlTextWriter.

Architectural Overview of Adaptive Control Behavior
http://msdn2.microsoft.com/en-us/library/67276kc5.aspx

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke

"Rob Roberts" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Is there any way to change VS2005 to generate HTML 4.01/Strict instead of
> XHTML 1.0/Transititional? VS2005 puts a DOCTYPE statement specifying
> XHTML 1.0/Transitional at the top of every new aspx page. Is there any
> way to change it to specify an HTML 4.01/Strict DOCTYPE instead?
>
> Thanks in advance,
> --Rob Roberts
>
>



 
Reply With Quote
 
 
 
 
Kim Quigley
Guest
Posts: n/a
 
      01-20-2006
Hello,

Would the following solution apply?

Open an aspx page in Source view. Go to View > Toolbars and make sure "HTML
Source Editing" is selected. Look for a drop down list in the toolbar.

Select "HTML 4.01" from that drop down list.

Kim


 
Reply With Quote
 
Rob Roberts
Guest
Posts: n/a
 
      01-20-2006
Kim,

> Would the following solution apply?
>
> Open an aspx page in Source view. Go to View > Toolbars and make sure
> "HTML Source Editing" is selected. Look for a drop down list in the
> toolbar.
>
> Select "HTML 4.01" from that drop down list.


That seems to only affect the HTML validation that the IDE does, exactly the
same as the Text Editor/HTML/Validation/Target option under Tools/Options.
(If you hover your mouse over the drop down list in the HTML Source Editing
toolbar, a hint pops up that says"Target Schema for Validation". It doesn't
seem to affect the DOCTYPE that gets added at the top of new aspx pages.
Even if "HTML 4.01" is selected in the drop down list, new aspx pages still
end up with a DOCTYPE of XHTML 1.0 Transitional.

Or am I missing something?

Thanks,
--Rob Roberts


 
Reply With Quote
 
Kim Quigley
Guest
Posts: n/a
 
      01-20-2006
I was having a problem yesterday that related to the doctype. I was trying
to set the height of a table to 100%, but XHTML doesn't support the height
attribute. (see http://www.bernzilla.com/item.php?id=116 if interested)

I did change the target schema for validation as I suggested, but now I
remember what I did that actually made a difference. I added a MasterPage
file and applied it to all of my pages. Then you only have to change the
doctype that is in the MasterPage. In my case, I just deleted the doctype
tag from the MasterPage file.

Sorry about the misinformation! I know that this solution does not
ultimately answer your question of whether or not you can change the default
doctype, but maybe it will be a workaround that you can use.

Kim

"Rob Roberts" <(E-Mail Removed)> wrote in message
news:uXg0$(E-Mail Removed)...
> Kim,
>
>> Would the following solution apply?
>>
>> Open an aspx page in Source view. Go to View > Toolbars and make sure
>> "HTML Source Editing" is selected. Look for a drop down list in the
>> toolbar.
>>
>> Select "HTML 4.01" from that drop down list.

>
> That seems to only affect the HTML validation that the IDE does, exactly
> the same as the Text Editor/HTML/Validation/Target option under
> Tools/Options. (If you hover your mouse over the drop down list in the
> HTML Source Editing toolbar, a hint pops up that says"Target Schema for
> Validation". It doesn't seem to affect the DOCTYPE that gets added at the
> top of new aspx pages. Even if "HTML 4.01" is selected in the drop down
> list, new aspx pages still end up with a DOCTYPE of XHTML 1.0
> Transitional.
>
> Or am I missing something?
>
> Thanks,
> --Rob Roberts
>
>



 
Reply With Quote
 
Rob Roberts
Guest
Posts: n/a
 
      01-20-2006
Kim,

Thanks for the additional information. I'm also using a MasterPage, and I
did change the doctype in it, but I was still wondering whether the default
doctype for new pages that don't use this MasterPage could be changed. I
guess it isn't possible...

--Rob Roberts

"Kim Quigley" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I was having a problem yesterday that related to the doctype. I was trying
>to set the height of a table to 100%, but XHTML doesn't support the height
>attribute. (see http://www.bernzilla.com/item.php?id=116 if interested)
>
> I did change the target schema for validation as I suggested, but now I
> remember what I did that actually made a difference. I added a MasterPage
> file and applied it to all of my pages. Then you only have to change the
> doctype that is in the MasterPage. In my case, I just deleted the doctype
> tag from the MasterPage file.
>
> Sorry about the misinformation! I know that this solution does not
> ultimately answer your question of whether or not you can change the
> default doctype, but maybe it will be a workaround that you can use.
>
> Kim
>
> "Rob Roberts" <(E-Mail Removed)> wrote in message
> news:uXg0$(E-Mail Removed)...
>> Kim,
>>
>>> Would the following solution apply?
>>>
>>> Open an aspx page in Source view. Go to View > Toolbars and make sure
>>> "HTML Source Editing" is selected. Look for a drop down list in the
>>> toolbar.
>>>
>>> Select "HTML 4.01" from that drop down list.

>>
>> That seems to only affect the HTML validation that the IDE does, exactly
>> the same as the Text Editor/HTML/Validation/Target option under
>> Tools/Options. (If you hover your mouse over the drop down list in the
>> HTML Source Editing toolbar, a hint pops up that says"Target Schema for
>> Validation". It doesn't seem to affect the DOCTYPE that gets added at
>> the top of new aspx pages. Even if "HTML 4.01" is selected in the drop
>> down list, new aspx pages still end up with a DOCTYPE of XHTML 1.0
>> Transitional.
>>
>> Or am I missing something?
>>
>> Thanks,
>> --Rob Roberts
>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PSD to XHTML Conversion, PSD to HTML, Joomla, Drupal, WordpressConversion, PSD to XHTML CSS xhtml champs XML 0 08-02-2011 05:40 AM
PSD to XHTML Conversion, PSD to HTML, Joomla, Drupal, WordpressConversion, PSD to XHTML CSS xhtml champs C Programming 0 08-01-2011 06:29 AM
Html 4.01 strict instead of xhtml? Andy Bell ASP .Net 5 08-08-2007 06:57 AM
Changing browser "text size" in VS2005 HTML design view. Alan ASP .Net 2 10-08-2006 05:13 PM
does vs2005 support wap2.0(xhtml) ringerxyz ASP .Net Mobile 0 12-05-2005 06:28 AM



Advertisments