Pregunta

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 ?

¿Fue útil?

Solución

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!

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top