DotNetNuke 4.5.2 brings additional Microsoft ASP.NET AJAX functionality. This will be demonstrated using a simple module that allows you to search among the users of a DotNetNuke portal (using a re-usable .ascx control) and send them an email message. All operations will be achievable without any post backs.
The source code is available in both VB and C# at the end of this article.
Also see:
This allows you to easily take any control on the page and have it wrapped by an
UpdatePanel.
If DotNetNuke.Framework.AJAX.IsInstalled Then
DotNetNuke.Framework.AJAX.RegisterScriptManager()
DotNetNuke.Framework.AJAX.WrapUpdatePanelControl(pnlEmail, True)
End If
if (DotNetNuke.Framework.AJAX.IsInstalled())
{
DotNetNuke.Framework.AJAX.RegisterScriptManager();
DotNetNuke.Framework.AJAX.WrapUpdatePanelControl(pnlEmail, true);
}
This
allows for exclusions of controls from UpdatePanel async processing. This was
implemented in the UrlControl to prevent partial rending when uploading files
(stream operations do not work with partial rendering).
If DotNetNuke.Framework.AJAX.IsInstalled Then
DotNetNuke.Framework.AJAX.RegisterScriptManager()
DotNetNuke.Framework.AJAX.WrapUpdatePanelControl(pnlEmail, True)
DotNetNuke.Framework.AJAX.RegisterPostBackControl(btnPostBack)
End If
if (DotNetNuke.Framework.AJAX.IsInstalled())
{
DotNetNuke.Framework.AJAX.RegisterScriptManager();
DotNetNuke.Framework.AJAX.WrapUpdatePanelControl(pnlEmail, true);
DotNetNuke.Framework.AJAX.RegisterPostBackControl(btnPostBack);
}
This creates an update progress control. This was implemented in Skin.vb so that
the update progress control is automatically injected by the framework for
modules which support partial rendering.
This was
necessary in order to set the UpdatePanel.UpdateMode to Conditional - which is
now the default (it was mistakenly set to All in the previous version).
Source Code:
Download the code: AJAX Email 01.00.00 (VB) / (C#)
[Back to: The ADefWebserver DotNetNuke HELP WebSite]
Buy DotNetNuke Modules from Snowcovered |
DotNetNuke™ is a registered trademark of DotNetNuke Corporation.