Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0XHTML Strict OutputXHTML Strict Output
Previous
 
Next
New Post
8/15/2006 11:09 AM
 
Our webdesigner has been having a nightmare trying to make an XHTML strict skin for DNN - seems that the viewstate gets moved and placed outside of any div or fieldset tags. The solution we came up with was to get the source and alter the PageBase.vb file like this:


        ' This method overrides the Render() method for the page and moves the ViewState
        ' from its default location at the top of the page to the bottom of the page. This
        ' results in better search engine spidering.
        Protected Overrides Sub Render(ByVal writer As System.Web.UI.HtmlTextWriter)

            Dim stringWriter As System.IO.StringWriter = New System.IO.StringWriter
            Dim htmlWriter As HtmlTextWriter = New HtmlTextWriter(stringWriter)

            'Localize controls
            Trace.Write("LocalizedPage::PreRender", String.Format("Performing substitutions for {0}", Thread.CurrentThread.CurrentUICulture.Name))
            IterateControls(Controls, _localizedControls, LocalResourceFile)
            Trace.Write("LocalizedPage::Render", "Removing resourcekey attribute from controls")
            RemoveKeyAttribute(_localizedControls)

            MyBase.Render(htmlWriter)

            Dim html As String = stringWriter.ToString()
            Dim StartPoint As Integer = html.IndexOf("<input type=""hidden"" name=""__VIEWSTATE""")
            If StartPoint >= 0 Then    'does __VIEWSTATE exist?
                Dim EndPoint As Integer = html.IndexOf("/>", StartPoint) + 2
                Dim ViewStateInput As String = html.Substring(StartPoint, EndPoint - StartPoint)
                html = html.Remove(StartPoint, EndPoint - StartPoint)
                Dim FormEndStart As Integer = html.IndexOf("</form>")
                If FormEndStart >= 0 Then
                    html = html.Insert(FormEndStart, "<fieldset class=""viewstate"">" + ViewStateInput + "</fieldset>")
                End If
            End If
            writer.Write(html)

        End Sub

Any chance of getting this extremely simple change put into the full version? It would save the hassle of having to change the source every time we need to do an accessible and fully compliant deployment.
 
New Post
8/15/2006 2:42 PM
 
I suggest you add this to the bug tracker. http://support.dotnetnuke.com

Edit your Skin.xml and Container.xml files with:
Yannick's SXE
 
New Post
8/17/2006 5:41 PM
 
Speaking of XHTML Strict, how is the core Default.aspx page being addressed? It has a lot of uppercase tags, unquoted attribitutes etc. and considering it is the main page it would drastically reduce the number of XHMLT errors if some time was spent on it. I started doing my own but then realised I would have to maintain it each time a new version came out. I could help out if required?


Entrepreneur

PokerDIY Tournament Manager - PokerDIY Tournament Manager<
PokerDIY Game Finder - Mobile Apps powered by DNN
PokerDIY - Connecting Poker Players

 
New Post
9/4/2006 7:25 PM
 
Altering the web.config to this:

<configuration>

    <system.web>

        <!--
            <xhtmlConformance mode = "Strict" />
        -->
        <xhtmlConformance mode="Strict" />

    </system.web>

</configuration>

may help - more info from Scott Guthrie here.


 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0XHTML Strict OutputXHTML Strict Output


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out