How to capture parameters by XSL?

Asked

Viewed 106 times

1

I’m modifying a form in Sharepoint and want to get the parms that are being passed in the url, someone has a suggestion?

 <xsl:element name='a'>
 <xsl:attribute name='href'>
 http://smallserver:777/tools/geraDoc2.aspx?
 <xsl:value-of select="parametroComNomeDeIDqueEstáNaURL" />
 </xsl:attribute>

1 answer

1


In Sharepoint you can use ParameterBinding to associate a key from Querystring is a parameter. Thus, for a Querystring ?IDSelecionado=10, the following code:

<ParameterBinding Name="IDSelecionado" Location="QueryString(IDSelecionado)"/>
Código correspondent no XSL: 
<xsl:param name=“IDSelecionado”/>

Will return 10 when the parameter IDSelecionado be evaluated.

Source: MSDN, 'XSLT Parameter Bindings'

  • But Location="Querystring(Idselected) <-- is my parameter name??

  • @Rogerscorrea Parameterbinding will get the value of your Querystring and then transform it into a Parameter that you can then consume.

  • For example my parm is ID, so that’s what goes inside the Querystring?

  • Blza got it! now I just have a problem, how do I put this value on screen? use xsl:value:of?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.