Developer forum

Forum » Development » Default page for current area

Default page for current area


Reply
Since it's not possible to read the current area ID from session before the page has actually been visited, I would like to know how to retrieve the ID of the default page for the accessed domain/area

Replies

 
Reply
ml@acph.dk wrote:

Since it's not possible to read the current area ID from session before the page has actually been visited, I would like to know how to retrieve the ID of the default page for the accessed domain/area






hmm this seems to get the current areaID:



PageView Pageview = new PageView();

int areaID = Pageview.AreaID;





still need to get the default page though.
 
Reply
PageView Pageview = new PageView();



int pageID = Pageview.ID;



try this instead, it ought to work.
 
Reply
RAP wrote:

PageView Pageview = new PageView();







int pageID = Pageview.ID;







try this instead, it ought to work.




This just returns the ID of the current page that is being viewed - it doesn't return the ID of the default/top/entry page of the current area.
 
Reply

The default page will be displayed if you navigate to /Default.aspx?AreaID=XX. Does this solve your problem?

 
Reply
Sorensen wrote:


The default page will be displayed if you navigate to /Default.aspx?AreaID=XX. Does this solve your problem?






jep! - that solved it, thanks.

 

You must be logged in to post in the forum