Thursday, January 3, 2013

Get the URL of the current page from xslt?

Requirement: The requirement is to create a column in data view web part with edit icon that should navigate to edit form.

Solution: XSL variable $PagePath is used to get the current page's URL.

Code:

<a onfocus="OnLink(this)" HREF="{$URL_Edit}?ID={@ID}&amp;Source={$PagePath}"><img border="0" src="/_layouts/images/edititem.gif" alt="" /></a>

No comments:

Post a Comment