Click here to Skip to main content
15,897,273 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All.

I used Dataview Webpart in Sharepoint Designer.
<xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row" />

The above is xsl:variable that is created by default which has query in the variable "$Rows".

Now i have couple of textboxes on the same form.
Is there way to create xsl:variable dynamically depending on the value in the textbox.

I am going to filter the dataview webpart based on the text entered in the textbox, so i need to create the xsl:variable accordingly.

Please sugget if any body has solution.
Posted
Updated 31-Aug-10 5:59am
v2

1 solution

Depends on what you mean by "create xsl:variable dynamically". You can change the node selection path based on what is entered into a textbox. For example, in this select:
/dsQueryResponse/Rows/Row

You could dynamically choose part of that with the value from a textbox:
/*[local-name() = $valueFromTextBox]/Rows/Row

It would go something like that anyway (not sure if the syntax is 100% accurate). The key is that you use local-name() to choose the node based on the name, which you can compare against another variable.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900