vcsharp
  •  vcsharp
  • 88.4% (Honored)
  • YAF Commander Topic Starter
2019-09-29T07:04:43Z
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
2019-09-29T07:41:02Z
Its in the source of the Forum control..

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

UserPostedImage
vcsharp
  •  vcsharp
  • 88.4% (Honored)
  • YAF Commander Topic Starter
2019-09-29T11:41:59Z
Originally Posted by: tha_watcha 

Its in the source of the Forum control..

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



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
2019-09-29T12:41:32Z
Originally Posted by: vcsharp 

Originally Posted by: tha_watcha 

Its in the source of the Forum control..

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



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?



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

Originally Posted by: vcsharp 


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);



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


UserPostedImage
vcsharp
  •  vcsharp
  • 88.4% (Honored)
  • YAF Commander Topic Starter
2019-09-30T06:54:47Z
Originally Posted by: tha_watcha 

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



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
2019-09-30T07:47:12Z
Originally Posted by: vcsharp 

Originally Posted by: tha_watcha 

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



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.



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

How to Add new Page

UserPostedImage

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved