Is it necessary to use the Page keyword in asp.net? For example, are there differences setting the Title or control if the page IsPostBack?
If we don’t use the Page keyword will there be a problem in the future?
Because the code appears to do the same thing:
Page.Title = "Test";
is equal to
Title = "Test";
ASP.NET pages and controls ultimately inherit from
Control, which has a property namedPage, which refers to the current page the control is on, or, in the case of pages, the page themselves. As far as I know, there’s no difference between callingPage.TitleandTitlefrom your pages, because they both refer to the same object. The question then, becomes a matter of preference and convention. I would pick one way and stick with it for readability.Reference: