November Happy Hour will be moved to Thursday December 5th.

Name and PageName properties of PageData ?

Vote:
 

Whats the difference between Name and PageName properties of Pagedata?

#175842
Mar 03, 2017 21:21
Vote:
 

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.

#175848
Mar 03, 2017 23:49
Vote:
 

Thank you Dejain! Appreciate your help!

#175928
Mar 06, 2017 17:49
Vote:
 

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?

#179664
Jun 19, 2017 13:43
Vote:
 

Yes! As Dejan said no matter which property you use, you shpuld get the same result.

#179665
Jun 19, 2017 15:29
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.