locked
Get value of list item id into hyperlink querystring? RRS feed

  • Question

  • I need to create a link that will contain a Query String and pass it to another page so one of my custom web parts will function. I am trying to create this link in the "DispForm.aspx" page of a custom list i created. I opened up that page on SharePoint designer and I want to create that link. I treid using the Form Action Hyperlink SharPoint control and also the Form Action Button SharePoint control from SharePoint designer but both dont redirect me to that page. I also tried getting the value of the xsl into javascript but that dont work:

                                <xsl:value-of select="@ID"/>
    Any other ideas on how to create a hyperlink that contains the ID of the current item on a sharepoint aspx?

    Victor Palma
    Friday, June 5, 2009 5:43 PM

Answers

  • If you are in a DispForm.aspx, then you already have the "ID" query string in your request URL. You can use that query string value to build your own custom URL. If you want to use ASP.NET code, you can access the QueryString["ID"] property.

    If you want to use SharePoint Designer without coding, you can follow the steps outlined in this forum post


    -- Edin http://edinkapic.blogspot.com
    • Marked as answer by Victor Palma Monday, June 8, 2009 11:26 PM
    Friday, June 5, 2009 9:44 PM