I no longer work at Microsoft, so please don't bother leaving a comment here or trying to contact me through my MSDN blog.
You can find my new blog at http://www.technologytoolbox.com/blog/jjameson. My new site also provides copies of all posts from my MSDN blog.
This morning I received an email from a customer inquiring about making it easier for users to determine the unique identifier for each document in a library. Typically, users don't really care about this "List Item ID" for a document, but there are scenarios where this is useful (or perhaps even required).
My initial suggestion was to inform users to obtain the ID from the item properties URL. For example, if you are viewing the properties of a document (http://server/Library/Forms/DispForm.aspx?ID=1956) then you can inspect the URL and determine that 1956 is the ID. Okay, I'll admit, this gets a little cumbersome depending on the URL. For example, it certainly isn't as easy to extract ID 2531 from http://server/sites/foobar/Lists/Work%20Items/EditForm.aspx?ID=2531&Source=http%3A%2F%2Fserver%2Fsites%2Ffoobar%2FLists%2FWork%2520Items%2FOpenItems%2Easpx.
My alternate suggestion -- if the former was deemed unacceptable -- was to display the ID on the item properties page by modifying the item "View" template, similar to changes we had previously made for the "Edit" template in order to render custom field controls. I wasn't wild about this idea, but it was the only other option I could see at the time.
With dreams of a creating a "killer utility for SharePoint", I set out to write a little code to do the work of parsing the ID from various forms of the URL. Here is what I came up with:
Parse List Item ID
Parse List Item ID
With all due credit to the MSDN team, here is some more detail that I snarfed from their FAQ page (with minor modifications, of course):
For Internet Explorer users:
For Firefox users: