{$SharePointDesignerQuirk}

Personally, I have never been a fan of using GUI development tools for web design, especially Microsoft web development tools. FrontPage has never even been on my list for necessary web development tools and I have never recommended it to anyone that wanted to design a web site. Unfortunately, SharePoint Designer is essentially FrontPage with new features added to compliment the Windows SharePoint Services (WSS) or Microsoft Office SharePoint Server (MOSS) functionality.

If you conform to the options given in SharePoint Designer, you will run into only a few minor issues. However, if you fight the rigor mortis that is SharePoint Designer, you will run into more frustrating issues. One that I had ran into a while back was the {generate_id()} function that is automatically added, at random times mind you, to an XHTML tag id property. Although the idea was to help (force?) less-experienced programmers use unique names in the id property, this “feature” is aggravating to experienced programmers. Even with confusingly complex applications, Microsoft develops for the supposed lowest common denominator, which in some cases seems to be a lab monkey.

Enough… enough… what is the solution?

Solution – XSL Param

As part of the <xsl:template> definition tags, create a new <xsl:param> tag that you will use as an empty parameter on the id properties that you wish SharePoint Designer to leave alone. As an example, you would add this tag immediately following a dvt row:

<xsl:template name="dvt_1.rowedit">
<xsl:param name="Pos" />
<xsl:param name=" SharePointDesignerQuirk " />

Now you may deploy this empty parameter throughout the xsl template as desired. An example shows a custom div tag with an id property:

<div id="commentsDiv{$SharePointDesignerQuirk}">

Data Source Controls Solution – XSL Param

The above trick works for Data Source Controls also, and you may need to use it if you the Data Source Control you inserted into your SharePoint Designer page is using the {generate_id()} function. Without forcing SharePoint Designer to stop “helping” those that are more intelligent than a lab monkey, you will notice that SharePoint fields, such as a DropDownList, will not show fields that you thought were associated with the SharePoint list.

changedatabindings

Aaron Gilbert

About aaron

IT is not just a job but also a passion. Everything I have accomplished, both personally and professionally, has been generally entertaining, bordering on fun. Some of my projects, such as working with SharePoint Services workflow actions in Visual Studio or building a custom iSCSI SAN using the OpenSolaris, ZFS and COMSTAR, has been quite rewarding. You may think nerd...I think developing a new trend!