A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
Hi Nimz,
That's an interesting question :)
PageName is defined like this:
[EditorBrowsable(EditorBrowsableState.Never)]
public virtual string PageName
{
get
{
return this.Name;
}
set
{
this.Name = value;
}
}
And Name is defined like this:
[StringLength(255)]
public virtual string Name
{
get
{
return (string) this["PageName"] ?? string.Empty;
}
set
{
this["PageName"] = (object) value;
}
}
So, if I'm not wrong:
- In edit mode, you're allowed to change the value of Name property.
- PageName delegates get/set actions to the Name property
- Under the hood, Name is actually is saved as PageName
That's a bit confusing, but no matter which property you use, you'll get the same result.
I was just wondering about this as well, and then found this post :)
So due to PageName not being discoverable with intellisense, Name would be prefered?
Yes! As Dejan said no matter which property you use, you shpuld get the same result.
Whats the difference between Name and PageName properties of Pagedata?