Domanda

I have a DataFormWebPart that has <datafields> @ID,ID; </datafields> I want to pass this variable to the redirect url in GenFireServerEvent.

Example: ManageView.aspx?ID=51

<a href="javascript: {ddwrt:GenFireServerEvent(concat('__cancel;__delete={',$KeyField,'=',$KeyValue,'};__commit;__redirect={http://myportal.website.com/site/ManageView.aspx?ID=',$ID,'}'))}" onclick="return DeleteItemConfirmation();"><img src="Delete-icon.png" width="10" height="9" border="0"/></a>

Can someone please help ?

È stato utile?

Soluzione

I just figured out how to do it using xsl variable and value of.

<xsl:variable name="ID">
    <xsl:value-of select="substring-before(@FileLeafRef, '-')"/>
</xsl:variable>
<a href="javascript: {ddwrt:GenFireServerEvent(concat('__cancel;__delete={',$KeyField,'=',$KeyValue,'};__commit;__redirect={http://myportal.website.com/site/ManageView.aspx?ID=',$ID,'}'))}" onclick="return DeleteItemConfirmation();"><img src="Delete-icon.png" width="10" height="9" border="0"/></a>

Great!

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top