The Posting object (that contains a collection of placeholders among other
things) can be loaded by its path using the Searches object.
You need to check out the Searches.GetByPath method
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sitedevl/htm/frlrfmicrosoftcontentmanagementpublishingsearchesclassgetbypathtopic.asp)
Regards
--
________________________________________
Angus Logan (MCAD/MCDBA/MCP/MVP for MCMS)
Product Specialist
Microsoft Application Solutions
Data#3 Limited
E angus...@data3.com.au
BLOG www.anguslogan.com
________________________________________
"Varad" <vara...@gmail.com> wrote in message
news:08A88CBA-4B24-4DA2...@microsoft.com...
Dim curPostingPath = Request.QueryString("CurPath")
Dim curPostingName = Request.QueryString("posting")
Dim curPostingObject As Searches
Dim newObject As Object = curPostingObject.GetByPath(curPostingPath)
I'm getting the error "Object reference not set to an instance of an
object." where I'm doing the GetByPath.
Thanks.
that usually indicates that either the path does not exist or the current
user does not have rights to this channel.
Cheers,
Stefan.
"Varad" <vara...@gmail.com> wrote in message
news:F514AB27-DBF0-40D8...@microsoft.com...
Dim curPostingPath = Request.QueryString("CurPath").ToString
Dim curPostingName = Request.QueryString("posting").ToString
Dim curPostingObject As Searches
Dim cmsAppCtx As CmsApplicationContext
->>Added this: cmsAppCtx = New CmsApplicationContext
cmsAppCtx.AuthenticateAsCurrentUser(PublishingMode.Published)
Dim newObject As Posting = cmsAppCtx.Searches.GetByPath(curPostingPath)