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
Mar 25, 2008 18:35
Vote:
 
Are you testing the page in Editmode? /snive
#14573
Mar 25, 2008 18:45
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
Mar 25, 2008 18:45
Vote:
 
Hi! CurrentPage.PageLink.ID will return the pageid /johan
#14575
Mar 25, 2008 18:45
Vote:
 
Hi Johan Thank you very much for your help, now it works. Murali
#14576
Mar 25, 2008 18:45
* 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.