Andrew Connell [MVP MOSS]
1543 Posts |  42 Articles |  4748 Comments
.NET  |  MCMS  |  SharePoint  |  Office System
SharePoint Quick Links
Article Categories
Archives
Post Categories


Add to Technorati Favorites

Seems three questions keep coming through from readers of my blog and some of my fellow IM cronies, so I figured I’d mention them here to hopefully answer any questions in the future (ala Google/MSN/Technorati)…

Cross Browser Support in MOSS… specifically WCM

Web Content Management (WCM), and SharePoint Server (MOSS) will work not only in IE, but also in Mozilla based browsers like FireFox & Apple’s Safari. Those of you who were at the Office Developer Conference in late March, and those who were at the SharePoint Conference this week, probably saw the presenters use IE and FireFox. In many of the presentations I saw at DevCon, FireFox was used to demonstrate two different sessions. So for the next version, the SharePoint developers are testing against multiple browsers, not just IE.

Are WCM sites going to be XHTML compliant?

No sense in beating around the bush: No… not out of the box. The reader experience for the Internet site template will be compliant with the W3C HTML 4.01 Transitional spec (I think this is the one)… but there are a few exceptions. For example, Web Part zones won’t conform to this spec and the SharePoint specific UI (like WSS lists) don’t render HTML 4.01 compliant output.

The good news is you can make your WCM site XHTML compliant if you decide to. It’s not a trivial task, but it’s possible:

  • You’d need to modify the master pages & page layouts to make sure they were XHTML compliant.
  • New WCM Web Parts such as the TOC, Summary Links, and Content By Query, will need to be modified. These Web Parts use XSLT to transform the data to output as HTML. Modify the XSLT to render XHTML compliant output.
  • Create customized field controls that render XHTML compliant output.

ASP.NET 2.0 Web Parts & WSS v3 Web Parts

As it’s been widely reported, WSS v3 is built on top of ASP.NET 2.0… a significant improvement. For more, read Maurice’s post “On the final approach to Beta 2” or Scott’s post “SharePoint 2007 –– Built on ASP.NET 2.0”.

So, ASP.NET 2.0 has Web Parts… WSS v3 has Web Parts… which should you build? Good, and very popular question! The two are very similar. In fact, the WSS Web Part class (Microsoft.SharePoint.WebPartPages.WebPart) is derived from the ASP.NET 2.0 class (System.Web.UI.WebControls.WebParts.WebPart). The SharePoint class is primarily provided for backward compatibility with WSS v2 developed Web Parts.

So when is it appropriate to build Web Parts derived from the SharePoint class? If you need to do cross page connections, connections between two Web Parts that aren’t in a Web Part zone, client-side connections, or leverage the data caching infrastructure provided by SharePoint.

Unless you have a specific case, build ASP.NET 2.0 Web Parts for use in your WSS v3 or MOSS sites. I’d expect to see more guidance supporting this recommendation coming over the months leading up to RTM of MOSS.

posted on Wednesday, May 17, 2006 8:14 PM

Feedback

# Writing Custom Webparts for Sharepoint 2007 5/18/2006 10:23 AM Sahil Malik - blah.winsmarts.com
Gravatar As indicated in a previous post, and as Scott Guthrie also pointed out, Sharepoint 2007 is built upon ASP.NET 2.0. Well, so a Sharepoint 2007 WebPart is a decendant of an ASP.NET 2.0 WebPart, i.e. Your custom WebPart, inherits from Sharepoint WebPart, which inherits from an ASP.NET 2.0 WebPart. In this blogpost, we will see how to write the simplest possible Sharepoint 2007 WebPart and deploy it. Begin by creating a class library project, add references to System.Web, Microsoft.Sharepoint.dll. Then add a class as below, which as you can tell is a hella simple WebPart. using ...

# MOSS: cross-browser support, WCM XHTML compliance, and ASP.NET 2.0 vs. WSS v3 Web Parts 6/1/2006 2:10 AM Marwan Tarek Blog
Gravatar i liked this post via Andrew Connell
MOSS: cross-browser support, WCM XHTML compliance, and ASP.NET...

# re: MOSS: cross-browser support, WCM XHTML compliance, and ASP.NET 2.0 vs. WSS v3 Web Parts 2/12/2007 3:11 PM Sherman Woo
Gravatar Hi Andrew, a co-worker just came up and asked me from which class he should inherit, in developing a WebPart for 2007. Above, you mention that you expect to see more guidance... have you read up on anything "official" from MS?
Thanks.

# re: MOSS: cross-browser support, WCM XHTML compliance, and ASP.NET 2.0 vs. WSS v3 Web Parts 2/12/2007 5:56 PM AC [MVP MOSS]
Gravatar Sherman - The official recommendation is to use the ASP.NET 2.0 WebPart class in System.Web.UI.WebControls.WebParts. Don't use the SharePoint WebPart class unless you have a specific reason (which is usually for backwards compatibility).

# re: MOSS: cross-browser support, WCM XHTML compliance, and ASP.NET 2.0 vs. WSS v3 Web Parts 2/28/2007 10:23 AM Terry Showesr
Gravatar My question is, can SharePoint be made Strict XHTML compliant?

Is Strict compliance really practical based on the amount of work and potential for problems with future upgrades?


# re: MOSS: cross-browser support, WCM XHTML compliance, and ASP.NET 2.0 vs. WSS v3 Web Parts 2/28/2007 9:51 PM AC [MVP MCMS]
Gravatar Terry-
I believe it can me made to be in strict XHTML compliance, I'm not certain if it's 100%. But I'm pretty comfortable saying that anything you do can be done and be future proof, MOST LIKELY. Course, none of us can see the future, so there's no assurance.

# re: MOSS: cross-browser support, WCM XHTML compliance, and ASP.NET 2.0 vs. WSS v3 Web Parts 3/8/2007 12:46 PM amarreiros
Gravatar hi there Andrew, I was trying to make a wbpart that extends from ContentByQueryWebPart, since this webPart isn't connectable and to solve my problem i need a ContentByQueryWebPart that is connectable. So i extend from ContentByQueryWebPart and add all the logic needed so that the webpart become conectable. My problem is that after putting the dll in the right place and changing the webconfig, i could not found him in the new web parts off the galley and i can t include him...any clue off whats happening.

Alexandre
ps: everything looks good and i have made another webpart equal to this one but extending from webpart and that part works.

# re: MOSS: cross-browser support, WCM XHTML compliance, and ASP.NET 2.0 vs. WSS v3 Web Parts 3/8/2007 10:40 PM AC [MVP MOSS]
Gravatar Amarreiros-
Did you add the new Web Part to the Web Part Gallery?

# re: MOSS: cross-browser support, WCM XHTML compliance, and ASP.NET 2.0 vs. WSS v3 Web Parts 3/21/2007 4:41 PM AMarreiros
Gravatar Andrew, i try but i can“t my new webpart even apears in the new web part gallery. Can this being happen because when i extend from ContentByQueryWebPart i am also inherithing from sharepointwebpart?

Alexnadre

# re: MOSS: cross-browser support, WCM XHTML compliance, and ASP.NET 2.0 vs. WSS v3 Web Parts 3/22/2007 8:35 AM AC [MVP MOSS]
Gravatar Amarreiros-
Did you add your new Web Part to the Web Part gallery? It doesn't sound like you did.

# re: MOSS: cross-browser support, WCM XHTML compliance, and ASP.NET 2.0 vs. WSS v3 Web Parts 5/30/2007 12:46 PM phil shisbey
Gravatar Alexnandre,
Make sure your new web part class is declared public.

# re: MOSS: cross-browser support, WCM XHTML compliance, and ASP.NET 2.0 vs. WSS v3 Web Parts 9/20/2007 9:36 AM Thomas Glod
Gravatar Hi Amarreiros,
The solution to your problem is to put the dll with your web part that extends ContentByQueryWebPart in the GAC on the Sharepoint server and not in the bin directory. This will probably make it visible when you press the "New" button in the web part gallery. I have had this problem when extending the OWAInboxPart web part.

- Thomas Glod

# re: MOSS: cross-browser support, WCM XHTML compliance, and ASP.NET 2.0 vs. WSS v3 Web Parts 9/21/2007 9:53 AM AC [MVP MOSS]
Gravatar Thomas-
That is not good advice or a good solution. Throwing something in the GAC to get it to work is not how you want to do it. Web Parts in the /bin will also show in the WP Gallery when you click New.

# WebPartStorage and WebPart 10/4/2007 2:00 PM matt mcknight
Gravatar The AjaxBaseWebPart from CapDes includes [WebPartStorage:None] for the ScriptManager. This is not standard w/ WebPart (that I can tell). What would you suggest - do all files that inherit from this have to be based upon Sharepoint WebParts rather than strict .net 2.0?

thanks,
m

# re: MOSS: cross-browser support, WCM XHTML compliance, and ASP.NET 2.0 vs. WSS v3 Web Parts 7/21/2008 1:37 PM Zullu
Gravatar Hi,
I was going through the whole discussion to figure out whether anyone has something to offer as a solution for making my MOSS site FireFox/Safari compliant.

I need to get my external facing MOSS site to work in the latest versions of FireFox/Safari. It is already tested on IE but ForeFox 3.0.1 does not display the contents properly. Rather it does not display at all. I have used my custom Master Page. It has messed along these:
- No Top Navigation menus are displayed (Only the Search can be seen). It just displays the Background image on the bar.
- No Breadcrumbs are displayed.
- No Contents in the "PlaceHolderMain" region are displayed. Not even the Footer.

Any thoughts???
Thanks in advance.

Post Feedback

Title:
Name:
Email:
(email will not be displayed)
Url:
Comments: 
Please add 6 and 2 and type the answer here:    
All Comments Are Filtered & Moderated
Unfortunately comment spammers are just too effecient and are constantly dirtying up blogs with irrelevant and unwanted comments trying to improve their standing on search engines. All comments on this blog are moderated. I do not censor comments, but I don't approve comments with vulger language or those soliciting products. Most of the time comments are approved within a few hours of being submitted with the only exception when I'm traveling.

Why are you asking for my email address?
The only reason I'm asking for your email address, which isn't required to submit a comment, is to provide a gravatar if you've created an account for yourself and associated your email address with a small image. If you have a gravatar created for the email address you submit, it will appear next to your comment. Otherwise nothing will appear.

What is a gravatar?
A gravatar is a "globally recognized avatar." You can get more information about gravatars, as well as create your own for free, at www.gravatar.com. You can also view my gravatar here.


Copyright © 2003 - 2010 Andrew Connell
Creative Commons License 
This work is licensed under a Creative Commons License
Site design by Heather Solomon.

 
 
MOSS WCM Training
Looking for MOSS 2007 WCM developer training? Look no further! I teach my 5-day hands-on and online WCM classes for developers I offer through my company: Critical Path Training.

Get more information on the WCM courses!