vcsharp
  • Posts: 81
  • Joined: 03/10/2017
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
  • Posts: 4133
  • Joined: 06/03/2010
Its in the source of the Forum control..

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

UserPostedImage
vcsharp
  • Posts: 81
  • Joined: 03/10/2017
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
  • Posts: 4133
  • Joined: 06/03/2010
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
  • Posts: 81
  • Joined: 03/10/2017
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
  • Posts: 4133
  • Joined: 06/03/2010
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
Users browsing this topic
  •  guest
Forum Jump  
  • You cannot post new topics in this forum.
  • You cannot reply to topics in this forum.
  • You cannot delete your posts in this forum.
  • You cannot edit your posts in this forum.
  • You cannot create polls in this forum.
  • You cannot vote in polls in this forum.

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