Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesPage_Load event not firingPage_Load event not firing
Previous
 
Next
New Post
7/11/2011 1:01 AM
 
I spent half of my Sunday searching for an answer why my new created controls would not fire the Page_Load nor the Page_Init events. I went through blogs and forums, but none of the answers I found were valid in my case. The few references to dnn specifically were questions that never got an answer.

I did find the solution and since this question never received any answer, I feel I should share my findings with the community for those (beginning) developers, struggling over the same issue.

The events started firing only after I had modified the manifest file to include the new controls and after I subsequently ran that manifest file in dnn ("repair installation"). For the new view (I called TabView) I entered a node under <modules><module><controls>:

<control>

    <key>TabView</key>

    <title>NewsDesk Tab View</title>

    <src>DesktopModules/KhmerSupport.NewsDesk/TabView.ascx</src>

    <type>View</type>

    <helpurl></helpurl>

</control>

The control TabView.ascx must also be included in the <files> section of course, but that is not related to the firing of the Page_Load event. Another control that was built to be used inside my View controls (TaggingControl.ascx) - that only needed to be included in the <files> section of the manifest


One might think the manifest file is an issue at the end of the development cycle. I've learned my lesson now. That "half of my Sunday" may easily have been 10 hours, while under pressure to deliver a demo - yet it got solved

____________________________________
The one-eyed in the land of the blind.
 
New Post
7/12/2011 6:00 PM
 
DotNetNuke does not simply load ascx controls, it needs to be aware of them and what their permissions are, so what you're seeing here is requests for controls unknown to the system i.e. if i tried to load my control based on a key such as manage and misspelled it e.g. NavigateUrl("mnage") . I'm glad you found the issue and resolved it - theres another way which is also useful which is to use the host-module definitions. You can add in the new control definition and use it and when you're happy export the module and it will update the dnn manifest accordingly.

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
7/13/2011 12:25 PM
 
Thank you.

I finished the demo, one day late, but I had to use some work-arounds I am most unhappy with. To begin, the TabView control cannot be used. DotNetNuke automatically assigns the default admin skin to the TabView control. I can change skin and container by hijackking the onload event in default.aspx.vb/cs. That's how DSLocalizator does it. But since DSL already uses this and produces compiled code inside a dll, I cannot do that.

For my demo, I have tweaked DSL source to fulfill some of the functions NewsDesk should do - but that is a solution that is unsustainable. Yet, this was not enough. During the onload event, I can still change skin and container, but I cannot copy modules from other tabs. While TabController.CurrentPage.Panes does indeed return the panes of the skin applied to the TabView, using this TabController to copy modules to one of its panes leads nowhere. Debug sessions seemed to indicate that the TabControler tries to write the modules to the view tab.

Completing a tabview tab with publicity and other messages from the marketing staff is quite essential. I had created an xml reader to read the information from a "template" and intended another module to manage the distribution of these marketing modules over the message base. I still hope to find a way to pick up this idea again.

The solution I implemented for my demo was to create a completely new tab, not visible in the navigation system. That tab contains advertising already and one instance of my NewsDesk. By checking  HttpContext.Current.Request.QueryString, the NewsDesk module is able to find out that it is in a pseudo-tabview and in that case, it moves the newsitem title to the ModuleTitle. In my real tabview, I could not access that module title, I could only access modules from the module view (i.e. the normal 'View' control).

So my demo is ready, but my application is far from ready to be shared with the community. Sorry, but I'll keep working on it until it is

____________________________________
The one-eyed in the land of the blind.
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesPage_Load event not firingPage_Load event not firing


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out