YAFLogo

vcsharp
  • vcsharp
  • 88.4% (Honored)
  • YAF Commander Topic Starter
5 years ago
I am trying to understand how registration user controls gets loaded into forum user control. There is no place holder control like asp:Placeholder anywhere in yaf/pages/forum.ascx, so I am confused. There must be something like a master page being used for all aspx pages in yaf i.e. there must be some base user control. I cannot figure out where is the code for base user control and how/where reguser.ascx gets loaded (i.e. source code location for this)

I have following markup for including yaf in my aspx page.

<YAF:Forum runat="server" ID="forum" BoardID="1"></YAF:Forum>
Sponsor
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 Answer YAF Version: 4.0.0 rc 2
5 years ago
Its in the source of the Forum control..

this.currentForumPage = (ForumPage)this.LoadControl(src);
vcsharp
  • vcsharp
  • 88.4% (Honored)
  • YAF Commander Topic Starter
5 years ago

Its in the source of the Forum control..

this.currentForumPage = (ForumPage)this.LoadControl(src);

Originally Posted by: tha_watcha 

So, there is nothing like a master page in yaf; rather individual user controls from controls folder are added dynamically at run time for the top control, footer control, main content control and other parts every time the aspx page needs to rendered. Is that correct?

Also, the code that you mentioned has a minor part missing. The actual line of code has an underscore just before currentForumPage. The file where its found is in project yaf at following location: /classes/forum.cs.

this._currentForumPage = (ForumPage)this.LoadControl(src);
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
5 years ago

Its in the source of the Forum control..

this.currentForumPage = (ForumPage)this.LoadControl(src);

Originally Posted by: vcsharp 

So, there is nothing like a master page in yaf; rather individual user controls from controls folder are added dynamically at run time for the top control, footer control, main content control and other parts every time the aspx page needs to rendered. Is that correct?

Originally Posted by: tha_watcha 

Correct, are you trying to add a new page to yaf?

Also, the code that you mentioned has a minor part missing. The actual line of code has an underscore just before currentForumPage. The file where its found is in project yaf at following location: /classes/forum.cs.

this._currentForumPage = (ForumPage)this.LoadControl(src);

Originally Posted by: vcsharp 

Yes correct the old yaf uses underscores. I was referencing the Current YAF version (RC)

vcsharp
  • vcsharp
  • 88.4% (Honored)
  • YAF Commander Topic Starter
5 years ago

Correct, are you trying to add a new page to yaf?

Originally Posted by: tha_watcha 

Yes, I plan on doing so. The landing page after user logs in would be a custom page and not the landing page in yaf. I am still not sure if I can use the yaf framework for creating a new page or it would be better to just create it like a normal aspx page.

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
5 years ago

Correct, are you trying to add a new page to yaf?

Originally Posted by: vcsharp 

Yes, I plan on doing so. The landing page after user logs in would be a custom page and not the landing page in yaf. I am still not sure if I can use the yaf framework for creating a new page or it would be better to just create it like a normal aspx page.

Originally Posted by: tha_watcha 

Its actually easy to add a new page. Just follow the guide from here

[post=52957]How to Add new Page[/post]