Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Pass selected {ListID} from a listview web part

  Asked By: Roy    Date: May 06    Category: Sharepoint    Views: 3677

I need to get the ID of the list item that I selected and pass it to a
susequent page in the URL. I saw somewhere where you are supposed to be
able to use tokens to do that, as follows:


But that does not work - it passes "{ItemId}" as the value.

How do I do this?



3 Answers Found

Answer #1    Answered By: Joey Soto     Answered On: May 06

It's not "itemid", it's simply "ID".


Answer #2    Answered By: Gerard Randall     Answered On: May 06

Yes, I noticed that mistake, however how can I pass  that in the URL
from the AllItems.aspx? It does not seem to get passed automatically.

I have tried changing the listview  web part  to a DVWP web  part and
adding the ID like this --

<xsl:otherwise><a href="{substring-before(@URL, ', ')}?@ID=
{@ID}"><xsl:value-of select="substring-after
(@URL, ', ')" /></a></xsl:otherwise>

But when I try to select the All Links View for the Web Part, I get
the error

"Cannot save the property settings for this Web Part. Cannot complete
this action. Please try again."

Any ideas?

Answer #3    Answered By: Audra Mccormick     Answered On: May 06

Nevermind the below post - I was not on the AllItems.aspx page. My
list is a web  Part on my default.aspx page.

So, the real question is what do I need to modify in order to pass
the ID from a web part  list on a page?

Didn't find what you were looking for? Find more on Pass selected {ListID} from a listview web part Or get search suggestion and latest updates.