SharePoint XSLT Two or More Querystrings

As simple as this tip seems, it took me like 30 minutes to figure out how to fix my problem…if you use the & sign in a custom SharePoint page you will get an XSL transform error.

Querystrings

A quick overview… skip to the next section if you under querystrings.

Querystrings are a great/easy method for transferring information from one web page to another. You can transfer more than one “variable” of information by breaking up the querystring statement using the & sign. Here is an example:

http://mysharepoint/mypage.aspx?ID=1

Two querystring variables would be separated by an & sign:

http://mysharepoint/mypage.aspx?ID=1&source=http://mysharepoint/myotherpage.aspx

&

Who would’ve thought – maybe just me – instead of using the & sign in the href statement, you must use “&”. So, a two variable querystring would look like:

http://mysharepoint/mypage.aspx?ID=1&Source=http://mysharepoint/myotherpage.aspx

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!