Don't miss out Virtual Happy Hour this Friday (April 26).
Try our conversational search powered by Generative AI!
AI OnAI Off
Don't miss out Virtual Happy Hour this Friday (April 26).
Sorry...
The CurrentPage object itself is always null, not the properties.
In default.aspx (startpage) I have to write:
PageData startPage = new PageData(PageReference.StartPage);
PageData startPage = CurrentPage <- does not work.
I have also tried copying web.config from a working project (not migrated) and have made sure that the correct assemblies and versions are accessed.
The problem occurs on every page with/without masterpage and even if all I do is:
public partial class defaultRedesign : TemplatePage {
protected void Page_Load(object sender, EventArgs e) {
Response.Write(CurrentPage.LinkURL);
This is EPiServer 5.2.375.7 (due to migration).
Example
CurrentPage.LinkURL is always null.
String s = new PageData(PageReference.StartPage).LinkURL works.
Any ideas?