문제

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 ?

도움이 되었습니까?

해결책

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!

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top