Important notice

Please note that this blog is discontinued here. All the posts are also coppied to my new blog at
Important: Due to large amount of comment spam further commenting has been disabled here. If you wish to send me a comment, plase look up the same post on my new blog and leave comment there. Thanks!


Using parameters from URL as variables in XSLT Data View

This is a reply to PsychedEric in my post about QueryString. To use params from URL in an XSLT data view is quite simple. Once you have the data view inserted, display the options of the Data View and click on Parameters.

Next click the button "New Parameter" and enter a name for it. Then in a Parameter Source dropdown, select Query String.


Under the dropdown enter the variable name - which parameter in URL to read. For example if it will be reading parameter "p" in url just enter letter p. You can also set a default value if there is no p parameter in the URL.Next click OK.

And that's it. Now you can use this parameter for filtering, or in the Data View Web part as you desire. If you want to use the parameter in the DataView just enter its name with a $ (dollar) sign before it. SharePoint Designer's Intellisense will recognize it.

1 comment:

PsychedEric said...

Well, I found It by myself,
But thank you for your attention.

My last problem for this small project is to get data from any list ( calendar data list ) but in a way that a Administrator could easily add a list.

Until now I built my cross-calendar view in sharepoint designer with SharePoint:SPDataSource, and it works fine.

I saw that there is also SharePoint:SPDataSource, with DataSourceMode="CrossList" parameter. But there is no working example on the web. My idea is to get all the datas from any calendar lists, then exclude some that was not in parameter binding or in an other list of calendar.

Or I could construct an other webpart and connect with this on, but I don't how.

One more time, Thank you.

Best regard