SPListItem.Url returns an invalid URL?
something like: http://mossdev/Lists/ThisList/155_.000
?
The way to is instead of using the following code:
listItem.Url
Here goes two suggestions
1. listItem.ParentList.Forms[PAGETYPE.PAGE_DISPLAYFORM].Url + "?ID=" + listItem.ID
If this returns something like: http://mossdev/Pages/Lists/ThisList/DispForm.aspx?ID=155
This means you are using a relative URL. Build an absolute:
2. listItem.Web.Url + "/" +
listItem.ParentList.Forms[PAGETYPE.PAGE_DISPLAYFORM].Url + "?ID=" + listItem.ID
No comments:
Post a Comment