dotnetnuke module creation using .ASCX file - dotnetnuke

I was trying to understand how DotNetNuke dynamically loads web user controls (.ascx) that have statically defined event handlers. I've tried to go through the documentations available on DotNetNuke's website, but couldn't find a proper answer to my question.
Assume that the user control has a button inside it and has its click event specified in the .ascx file. The user control does not wire up the event handlers inside the page_load() or init(). So if the user control is dynamically loaded without wiring up the event handlers in the page_load() on every load, why does the event handler of the button still work? What is the process that DotNetNuke uses to create a module out of the ASCX file? It would also be great if anyone can point me to some documentation.

It simply loads the control early in the page lifecycle, there is nothing all that magical on how this works. They are regular ascx controls. The key is the definition of "AutoEventWireup" on the ascx.

Related

Dynamically "Delete" Icon hide show in in kendo scheduler

I have create new event in kendo scheduler.There is some problems in my scheduler.I want to show delete button only authorize person who is created this event.And I want to hide delete button who is not created this event,Only show event scheduler and hide icon.
I am so tired but not solved this problems please help
I think that you need to create different types of users and give them different perks. For example, the person who created that event will be an administrator. You have to create some function where the administrator will have the create and the destroy properties as true. To other users, you'll set those properties false. As for the hiding or not buttons, I suggest you to make your own custom edit form template. This was just a general idea but I hope you get the bigger picture.
updated answer:
Not only I think you should implement the CRUD operations manually but also customize the Scheduler behavior. Just like you can wire edit event and hide the save button if an user is not authorized or just like you can wire a save event and control wheather you allow or not event modifications, the same can be made with a delete event. Anyway, from what I understood, I think that using a custom editor template to control the state of any components should be enough. Basically, define a custom template and allow/disable/hide/show some widgets depending on the user that is logged in. The credentials can be loaded and used directly in the template. Check this dojo, it might be useful.

Flash --> Angular conversion: How can I have a child inject functionality to the parent?

I'm converting a Flash/Flex application into an angular application.
In flash, I have a header, toolbar above, and navigation to the left. When users click on the navigation, different modules are loaded into the applications main content pane. Most modules support New, Edit, Archive, and Un-archive actions. There are icons in the toolbar that execute the actions.
But there are some modules that support additional actions. In flex, when the child module loads, it loads a new button into the toolbar along with a callback function that will be called when the user clicks on the custom action button. When the module unloads, it removes the button from the toolbar.
So in angular, what could I use to achieve similar functionality? Is this a parent/child scope kind of thing or something else altogether? I'm new to angular and I'm not sure how to approach this problem.
Thanks in advance.

Loading views from various modules upon pressing Ribbon buttons in PRISM

I'm developing WPF application using PRISM. I have two regions :
Ribbon region (which has got buttons to launch views from different modules)
View Region (in which views from different modules will be loaded but one view at a time)
I have separate module assemblies for Ribbon and views (i.e. CustomerModule, OrderModule, etc.). My ribbon has got buttons which should load view from modules i.e. pressing "Customer" button should load the specific view from "CustomerModule", pressing "OrderModule" should load the specific view from "OrderModule", etc.
How should I implement the command for my ribbon buttons to launch the view from different module assemblies? I'm not sure on how I can access the view module information into my ribbon module?
You can just call the RequestNavigate method of the ViewRegion from each button's command method as corresponds:
void OnCustomerButtonClicked()
{
this.regionManager.Regions["ViewRegion"].RequestNavigate(new Uri("CustomerView", UriKind.Relative));
}
You should then define every navigation request on each button's command method to properly navigate to the selected View.
You may find more information regarding Navigation on the following Prism Guide chapter:
View-Based Navigation
I hope this helps.

WebBrowser control doesn't open links

I'm using the default WebBrowser control inside a WPF application. HTML code is loaded using NavigateToString method (html is passed as a parameter).
Pages render correctly, but users aren't able to click on any links (nothing happens when they click on the links). The problem was partly solved by adding the URLs to trusted zone, but that is not always possible.
Are there any configurations that should be adjusted in IE (or wherever else) that would allow opening any links inside an embedded WebBrowser?
in my case using MyWebBrowser.Navigate(new Uri(...)); works, and hyperlinks work as designed but when i use MyWebBrowser.NavigateToString(htmlContent); hyperlinks stop working

Silverlight App inside WPF WebBrowser?

I have a hopefully trivial question. Currently, my company works with a rather obscure language (SyngergyDE) and we need to call a SilverLight application inside our product. Unfortunately, this obscure 3rd party language only (currently) supports the opening of WPF screens. So with that said, I thought I'd develop a small WPF user control that contains a "WebBrowser" control and navigate to the silverlight application's URI. This works fine, and I'm able to see the SL application. Here is my question - we have a "Close" button on the SL application, and when users "Click" that button, we want the window to close.
Does anyone have any suggestions on how we can communicate the "Closing of the SL App" to the WPF user control, so that the entire WPF user control closes as well?
Thanks everyone,
-Tom
Attach an event handler to the WebBrowser.Navigated event.
Have the close button in the Silverlight application use:-
HtmlPage.Window.Navigate(new Uri("about:blank", UriKind.Absolute));
When the Navigated event fires in WPF with the url "about:blank" then its time to close the control.
Use Javascript and the HTML DOM as the glue here.
For example, when the SL app close button is clicked, have Silverlight trigger some Javascript code that sets a flag, or alternately, raises some HTML document event.
The WPF control could poll that flag in the HTML + Javascript, or alternately listen for that HTML document event, then close the user control.

Resources