Passing parameters from a dataview via querystring I have a dataview that displays the items from a list. I inserted a column and added a hyperlink, from there I added whatever parameters I wanted to pass, this works great. Now how can I do this with a button instead of a hyperlink? I tried to do it by adding a button instead of a hyperlink to my new column and placing this code inside my button: document.location.href = ('http://something/something.aspx' + &lt;xsl:value-of select=&quot;@whateverparameteriwanttopass&quot;/&gt;)<br/><br/>However instead of getting the specific value for the parameter of the row where I click the button like it does with the hyperlink, it always gives me the value of the last item in the dataview. How can I fix this?© 2009 Microsoft Corporation. All rights reserved.Sat, 04 Jul 2009 11:49:51 Z92df49c7-fba2-456a-a40c-8ce27409657ahttp://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/92df49c7-fba2-456a-a40c-8ce27409657a#92df49c7-fba2-456a-a40c-8ce27409657ahttp://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/92df49c7-fba2-456a-a40c-8ce27409657a#92df49c7-fba2-456a-a40c-8ce27409657aprostrationhttp://social.msdn.microsoft.com/Profile/en-US/?user=prostrationPassing parameters from a dataview via querystring I have a dataview that displays the items from a list. I inserted a column and added a hyperlink, from there I added whatever parameters I wanted to pass, this works great. Now how can I do this with a button instead of a hyperlink? I tried to do it by adding a button instead of a hyperlink to my new column and placing this code inside my button: document.location.href = ('http://something/something.aspx' + &lt;xsl:value-of select=&quot;@whateverparameteriwanttopass&quot;/&gt;)<br/><br/>However instead of getting the specific value for the parameter of the row where I click the button like it does with the hyperlink, it always gives me the value of the last item in the dataview. How can I fix this?Fri, 03 Jul 2009 21:24:34 Z2009-07-03T21:24:34Zhttp://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/92df49c7-fba2-456a-a40c-8ce27409657a#a30a12e0-bcd2-4940-b8a3-68c7877ffcfahttp://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/92df49c7-fba2-456a-a40c-8ce27409657a#a30a12e0-bcd2-4940-b8a3-68c7877ffcfaMchova01http://social.msdn.microsoft.com/Profile/en-US/?user=Mchova01Passing parameters from a dataview via querystring Try replacing <strong>&lt;xsl:value-of select=&quot;@whateverparameteriwanttopass&quot;/&gt;</strong> with <a href="mailto:{@whateverparameteriwanttopass"><strong>{@<span style="color:#000000">whateverparameteriwanttopass</span></strong></a><strong>}</strong>Fri, 03 Jul 2009 21:37:05 Z2009-07-03T21:37:05Zhttp://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/92df49c7-fba2-456a-a40c-8ce27409657a#19211745-0f65-4230-9641-316987710b04http://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/92df49c7-fba2-456a-a40c-8ce27409657a#19211745-0f65-4230-9641-316987710b04prostrationhttp://social.msdn.microsoft.com/Profile/en-US/?user=prostrationPassing parameters from a dataview via querystring No dice, already tried it, page gives an error when I click the button and does nothing.Fri, 03 Jul 2009 21:41:40 Z2009-07-03T21:41:40Zhttp://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/92df49c7-fba2-456a-a40c-8ce27409657a#500afad6-4e87-4739-b92a-7f9ef1dde96fhttp://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/92df49c7-fba2-456a-a40c-8ce27409657a#500afad6-4e87-4739-b92a-7f9ef1dde96fMchova01http://social.msdn.microsoft.com/Profile/en-US/?user=Mchova01Passing parameters from a dataview via querystring <p>Try replaing the code to create your button with the following:<br/><br/>&lt;INPUT TYPE=&quot;BUTTON&quot; VALUE=&quot;Button Title&quot; ONCLICK=&quot;window.location.href='http://something/something.aspx<strong>?ID={@ID}</strong>'&quot;/&gt;<br/><br/>Replace &quot;?ID=&quot; with the name of your parameter, (e.g. &quot;?Myparameter=&quot;)<br/>Replace <a href="mailto:{@ID">{@ID</a>} with the column name used for the parameter source (e.g. {whateverparameteriwanttopass})<br/><br/>This worked on my end.</p>Fri, 03 Jul 2009 21:56:29 Z2009-07-03T21:56:29Zhttp://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/92df49c7-fba2-456a-a40c-8ce27409657a#adf4c967-b994-455a-b9f2-cacca1b38242http://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/92df49c7-fba2-456a-a40c-8ce27409657a#adf4c967-b994-455a-b9f2-cacca1b38242prostrationhttp://social.msdn.microsoft.com/Profile/en-US/?user=prostrationPassing parameters from a dataview via querystring That did it, thanks.Fri, 03 Jul 2009 22:17:52 Z2009-07-03T22:17:52Z