Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Strange in getting Page Id

Vote:
 
Hi I am using the following code to get current page id string CurrentPageLink = CurrentPage.Property["PageLink"].ToString(); or string CurrentPageLink = CurrentPage.PageLink.ToString(); what I get from the above code is PageId+Some id is suffixed with pageid. (eg. 248_448), but I need only 248. Because of this I am unable to compare the pageid with other pages. Please help to get the page id alone, thanx in advance. Murali
#12599
Apr 18, 2006 19:38
Vote:
 
Are you testing the page in Editmode? /snive
#14573
Apr 19, 2006 8:39
Vote:
 
Hi Snive Thanks for the reply, Yes I am testing in Editmode, when I see in portal it comes correctly, but our client may use edit mode also. Please help. Murali
#14574
Apr 19, 2006 9:46
Vote:
 
Hi! CurrentPage.PageLink.ID will return the pageid /johan
#14575
Apr 19, 2006 13:00
Vote:
 
Hi Johan Thank you very much for your help, now it works. Murali
#14576
Apr 19, 2006 14:16
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.