SPListItem.URL Funky Return Fiesta
Man, I have never seen this before, but doing a simple SPListItem.URL and returning the URL returns a funky ass value. It looks like hex or some crap, like this:
What the hell is that? Shouldn’t the SPListItem.Url property return the actual URL to the item?
To get around this, you have to tailor your code a little bit differently.
- SPList list = site.Lists.GetList("MyList");
- SPListItem item = list.Items[id];
- list.Forms[PAGETYPE.PAGE_DISPLAYFORM].Url + "?ID=" + item.ID
Now you will actual retrieve the correct path to the DispForm.aspx page.
Wierd, eh? :)