It turns out to be, if a layouts page is being referenced relative to a proper web, and the List id and Item id are passed in as parameters, then I can get the SPContext.Current.ListItem referencing to the particular item being viewed and I can make use of the SharePoint Web Controls to display the field values.
http://localweb/{web url}/_layouts/ViewItem.aspx?List={list guid}&ID={itemid}
Example: http://localweb/home/_layouts/ViewItem.aspx?List={E2E0527C-EFB1-42D4-8FFE-20A6AC364845}&ID=1
In the ViewItem.aspx, I can make use of SharePoint web controls in the layouts page to display the field values as:
<SharePoint:FieldValue FieldName="Title" runat="server" />
Hope this helps some one else.Thanks
Happy Coding
Senthil S
No comments:
Post a Comment