﻿<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>The Dúnadan Blog</title>
    <description>Something happens everyday, everyday something's worth remembering.</description>
    <link>http://nes.nesinteractivos.com/English/DúnadanBlog/tabid/56/BlogId/8/Default.aspx</link>
    <language>en-US</language>
    <managingEditor>nestorsanchez@nesinteractivos.com</managingEditor>
    <webMaster>nestorsanchez@nesinteractivos.com</webMaster>
    <pubDate>Fri, 29 Aug 2008 00:45:33 GMT</pubDate>
    <lastBuildDate>Fri, 29 Aug 2008 00:45:33 GMT</lastBuildDate>
    <docs>http://backend.userland.com/rss</docs>
    <generator>Blog RSS Generator Version 3.4.0.39853</generator>
    <item>
      <title>Restoring a DB</title>
      <description>&lt;p&gt;Not every organization has the luxury of having a team that includes separate DBA's, developers and IT support. I just found an article that makes it easy for those that dread the moment when restoring a DB is inevitable. Check it out here: &lt;a href="http://www.builderau.com.au/program/sqlserver/soa/Restore-your-SQL-Server-database-using-transaction-logs/0,339028455,339282046,00.htm"&gt;http://www.builderau.com.au/program/sqlserver/soa/Restore-your-SQL-Server-database-using-transaction-logs/0,339028455,339282046,00.htm&lt;/a&gt;&lt;/p&gt;</description>
      <link>http://nes.nesinteractivos.com/English/DúnadanBlog/tabid/56/EntryID/156/Default.aspx</link>
      <author>nestorsanchez@nesinteractivos.com</author>
      <comments>http://nes.nesinteractivos.com/English/DúnadanBlog/tabid/56/EntryID/156/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://nes.nesinteractivos.com/Default.aspx?tabid=56&amp;EntryID=156</guid>
      <pubDate>Tue, 23 Oct 2007 21:55:57 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://nes.nesinteractivos.com/DesktopModules/Blog/Trackback.aspx?id=156</trackback:ping>
    </item>
    <item>
      <title>Reorganizing files in a DNN WAP module upgrade.</title>
      <description>&lt;p&gt;After releasing a module, sometimes a reorganization of files is performed in the development environment. Regardless of the method used to place the files in the corect locations, some locations will still contain the original files.&lt;/p&gt;
&lt;p&gt;For some time DNN has been able to perform a clean up (deletion) of files. This is achieved by including a text file in the PA with the version number in the  ##.##.##.txt format and it should list the paths and filenames that should be deleted.&lt;/p&gt;
&lt;p&gt;For example to delete the MyFile.ascx file, just include its name in the .txt file. If the file is within a directory like &lt;mywebsiteroot&gt;&lt;/mywebsiteroot&gt;/DesktopModules/MyModule/MySubDirectory/MyFile.ascx, remove the DesktopModules/MyModule path to obtain only a path relative to the module folder: MySubDirectory/MyFile.ascx.&lt;/p&gt;</description>
      <link>http://nes.nesinteractivos.com/English/DúnadanBlog/tabid/56/EntryID/61/Default.aspx</link>
      <author>nestorsanchez@nesinteractivos.com</author>
      <comments>http://nes.nesinteractivos.com/English/DúnadanBlog/tabid/56/EntryID/61/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://nes.nesinteractivos.com/Default.aspx?tabid=56&amp;EntryID=61</guid>
      <pubDate>Thu, 18 Oct 2007 18:28:45 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://nes.nesinteractivos.com/DesktopModules/Blog/Trackback.aspx?id=61</trackback:ping>
    </item>
    <item>
      <title>Displaying an animated gif in a Dotnetnuke module with AJAX</title>
      <description>&lt;p&gt;&lt;span class="Normal" id="dnn_ctr1391_MainView_ViewEntry_lblEntry"&gt; 
&lt;p&gt;After enabling AJAX, it's pretty easy to declaratively add an animated image using the UpdateProgress control from the Toolkit controls and an animated gif image. This post assumes you already know how to enable AJAX in your module, if not refere to &lt;a href="http://nes.nesinteractivos.com/Weblog/tabid/537/EntryID/63/Default.aspx"&gt;this previous post&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;After enabling AJAX in DNN in any of the two ways detailed in the mentioned post, add an Update panel with a Label and a button control.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;asp&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;:&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;UpdatePanel&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;ID&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;="UpdatePanel1"&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;runat&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;="server"&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;ContentTemplate&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;asp&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;:&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;Label&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;ID&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;="Label1"&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;runat&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;="server"&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;Text&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;="Label"&gt;&lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;asp&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;:&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;Label&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&gt;&lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;br&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;/&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;asp&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;:&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;Button&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;ID&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;="Button1"&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;runat&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;="server"&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;OnClick&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;="Button1_Click"&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;Text&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;="Button"&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;/&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;ContentTemplate&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;asp&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;:&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;UpdatePanel&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&gt;&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Add the UpdateProgress control to your .ascx file and set the AssociatedUpdatePanel property value to the Update Panel ID of the UpdatePanel you want it to be associated  to:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;asp&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;:&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;UpdateProgress&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;ID&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;="UpdateProgress1"&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;runat&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;="server"&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;AssociatedUpdatePanelID&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;="UpdatePanel1"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;asp&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;:&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;UpdateProgress&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&gt;&lt;/font&gt;&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;In the Progress Template element add an Image control with its ImageUrl property value pointing to your animated image.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;ProgressTemplate&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;asp&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;:&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;image&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;id&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;="updating1"&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;Imageurl&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;="~/DesktopModules/MyModule/Images/LoadingIcon.gif"&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;runat&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;="server"/&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;ProgressTemplate&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&gt;&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The final markup should look like this:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;asp&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;:&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;UpdateProgress&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;ID&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;="UpdateProgress1"&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;runat&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;="server"&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;AssociatedUpdatePanelID&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;="UpdatePanel1"&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;ProgressTemplate&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;asp&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;:&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;image&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;id&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;="updating1"&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;Imageurl&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;="~/DesktopModules/MyModule/Images/LoadingIcon.gif"&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;runat&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;="server"/&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;ProgressTemplate&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;asp&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;:&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;UpdateProgress&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;asp&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;:&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;UpdatePanel&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;ID&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;="UpdatePanel1"&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;runat&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;="server"&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;ContentTemplate&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;asp&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;:&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;Label&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;ID&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;="Label1"&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;runat&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;="server"&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;Text&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;="Label"&gt;&lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;asp&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;:&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;Label&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&gt;&lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;br&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;/&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;asp&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;:&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;Button&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;ID&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;="Button1"&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;runat&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;="server"&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;OnClick&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;="Button1_Click"&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;Text&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;="Button"&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;/&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;ContentTemplate&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;asp&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;:&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;UpdatePanel&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&gt;&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The best part about working with declarative programming is that you will not need to recompile your code.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;/span&gt;&lt;/p&gt;</description>
      <link>http://nes.nesinteractivos.com/English/DúnadanBlog/tabid/56/EntryID/64/Default.aspx</link>
      <author>nestorsanchez@nesinteractivos.com</author>
      <comments>http://nes.nesinteractivos.com/English/DúnadanBlog/tabid/56/EntryID/64/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://nes.nesinteractivos.com/Default.aspx?tabid=56&amp;EntryID=64</guid>
      <pubDate>Thu, 18 Oct 2007 18:28:21 GMT</pubDate>
      <slash:comments>3</slash:comments>
      <trackback:ping>http://nes.nesinteractivos.com/DesktopModules/Blog/Trackback.aspx?id=64</trackback:ping>
    </item>
    <item>
      <title>The BC30456 error in DNN</title>
      <description>&lt;p&gt;I faced this error while updating a module I had recently moved from a DNN3 environment to a DNN4 WAP one. I received all sorts of advice including &lt;a href="http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/111/threadid/137621/scope/posts/Default.aspx"&gt;this post&lt;/a&gt; filled bits and pieces but nothing was a solution. After a few frustrating hours I decided to go back to basics and review what I had done to move the module. The module was working OK in my development but not in my test install.&lt;/p&gt;
&lt;p&gt;After going through the web.config file, project configuration, dll naming setup, namespaces, references and everything inside the DNN VS Solution it was clear I was looking in the wrong place. Fianlly, I opened the nAnt build file and there it was. I had been compiling against a different dotnetnuke.dll. I was pointing to the wrong virtual directory, a previous DNN version install. The compiler never complained and I could get my module dlls. The module raised the error only at run-time in the test site. I just pointed the reference to the correct site and I was in the game again.&lt;/p&gt;
&lt;p&gt;I hope this helps someone else not to lose so many hours with something so obvious.&lt;/p&gt;</description>
      <link>http://nes.nesinteractivos.com/English/DúnadanBlog/tabid/56/EntryID/135/Default.aspx</link>
      <author>nestorsanchez@nesinteractivos.com</author>
      <comments>http://nes.nesinteractivos.com/English/DúnadanBlog/tabid/56/EntryID/135/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://nes.nesinteractivos.com/Default.aspx?tabid=56&amp;EntryID=135</guid>
      <pubDate>Thu, 18 Oct 2007 18:27:46 GMT</pubDate>
      <slash:comments>3</slash:comments>
      <trackback:ping>http://nes.nesinteractivos.com/DesktopModules/Blog/Trackback.aspx?id=135</trackback:ping>
    </item>
    <item>
      <title>Using AJAX in DNN 4.5.X</title>
      <description>&lt;p&gt;It's incredibly easy to use AJAX in the DNN 4.5.X versions. In this post I describe the two ways in which you may use AJAX in a DNN module.&lt;/p&gt;
&lt;p&gt;&lt;span class="SubSubHead"&gt;Use Control Definitions&lt;/span&gt;&lt;br /&gt;
Assuming AJAX is already installed in the web server that runs DNN, a module will be dynamically wrapped in an Update Module by doing one of two things:&lt;/p&gt;
&lt;p&gt;1) Adding the line below to the control node of a control in the .dnn manifest:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;font color="#0000ff" size="2"&gt;&lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;supportspartialrendering&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&gt;&lt;/font&gt;&lt;font size="2"&gt;true&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;supportspartialrendering&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&gt;&lt;/font&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt; 2) Select de checkbox for &lt;strong&gt;Supports Partial Rendering&lt;/strong&gt; in the control definition for the control that will use AJAX. Control definitions are reached after selecting a control to edit in a specific Module Definition in Host&gt;Module Definitions&gt;.&lt;/p&gt;
&lt;p align="center"&gt;&lt;img height="369" alt="" width="346" src="http://nes.nesinteractivos.com/Portals/0/Screens/AjaxEnableInDNN450.gif" /&gt;&lt;/p&gt;
&lt;p&gt;When the Partial rendering is enabled, the Microsoft Ajax Library can be used as well as the popular Control Toolkit.&lt;/p&gt;
&lt;p&gt;Try this simple example to test a module that has been AJAX-enabled through module definitions. Add a Label and an UpdatePanel to the view control of a module. The put a second Label and a Button inside the UpdatePanel.&lt;/p&gt;
&lt;p&gt;&lt;img height="109" alt="" width="178" src="http://nes.nesinteractivos.com/Portals/0/Screens/Ajax.gif" /&gt;&lt;/p&gt;
&lt;p&gt;Add an empty click event for the Button to create a postback. Then in the Page_Load event  add a timer and assign the current datetime value to the labels.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Courier New"&gt;System.Threading.Thread.Sleep(3000)&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Courier New"&gt;Label1.Text = DateTime.Now()&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Courier New"&gt;Label2.Text = DateTime.Now()&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Clicking on the button shpould only update the datetime value of the label inside the update panel while the first one is unchanged.&lt;/p&gt;
&lt;p&gt;&lt;img height="125" alt="" width="234" src="http://nes.nesinteractivos.com/Portals/0/Screens/Ajax2.gif" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="SubSubHead"&gt;Developer control&lt;/span&gt;&lt;br /&gt;
Remember that there can exist one and only one &lt;font face="Courier New"&gt;ScriptManager&lt;/font&gt; object in a page and since Dotnetnuke uses a single page, it's only logical that the framework and not the modules should be responsible of adding it dynamically. That is exactly what the &lt;strong&gt;Dotnetnuke.Framework.Ajax &lt;/strong&gt;class does. The class has 8 methods besides its constructor:&lt;/p&gt;
&lt;p align="center"&gt;&lt;img height="239" alt="" width="259" src="http://nes.nesinteractivos.com/Portals/0/Screens/AjaxClass.gif" /&gt;&lt;/p&gt;
&lt;p align="left"&gt;Taken from the class documentation:&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;&lt;font face="Courier New"&gt;AddScriptManager&lt;/font&gt;: &lt;font size="1"&gt;
    &lt;p&gt;AddScriptManager is used internally by the framework to add a ScriptManager control to the page&lt;/p&gt;
    &lt;/font&gt;&lt;/li&gt;
    &lt;li&gt;&lt;font face="Courier New"&gt;ContentTemplateContainerControl&lt;/font&gt;: &lt;font size="1"&gt;
    &lt;p&gt;ContentTemplateContainerControl gets a reference to the ContentTemplateContainer control within an UpdatePanel&lt;/p&gt;
    &lt;/font&gt;&lt;/li&gt;
    &lt;li&gt;&lt;font face="Courier New"&gt;CreateUpdatePanelControl&lt;/font&gt;: &lt;font size="1"&gt;
    &lt;p&gt;UpdatePanelControl dynamically creates an instance of an UpdatePanel control&lt;/p&gt;
    &lt;/font&gt;&lt;/li&gt;
    &lt;li&gt;&lt;font face="Courier New"&gt;IsInstalled&lt;/font&gt;: &lt;font size="1"&gt;
    &lt;p&gt;IsInstalled can be used to determine if AJAX is installed on the server&lt;/p&gt;
    &lt;/font&gt;&lt;/li&gt;
    &lt;li&gt;&lt;font face="Courier New"&gt;RegisterScriptManager&lt;/font&gt;: &lt;font size="1"&gt;
    &lt;p&gt;RegisterScriptManager must be used by developers to instruct the framework that AJAX is required on the page&lt;/p&gt;
    &lt;/font&gt;&lt;/li&gt;
    &lt;li&gt;&lt;font face="Courier New"&gt;RemoveScriptManager&lt;/font&gt;: &lt;font size="1"&gt;
    &lt;p&gt;RemoveScriptManager will remove the ScriptManager control during Page Render if the RegisterScriptManager has not been called&lt;/p&gt;
    &lt;/font&gt;&lt;/li&gt;
    &lt;li&gt;&lt;font face="Courier New"&gt;ScriptManagerControl&lt;/font&gt;: &lt;font size="1"&gt;
    &lt;p&gt;ScriptManagerControl provides a reference to the ScriptManager control on the page&lt;/p&gt;
    &lt;/font&gt;&lt;/li&gt;
    &lt;li&gt;&lt;font face="Courier New"&gt;SetScriptManagerProperty&lt;/font&gt;: &lt;font size="1"&gt;
    &lt;p&gt;SetScriptManagerProperty uses reflection to set properties on the dynamically generated ScriptManager control&lt;/p&gt;
    &lt;/font&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;It is possible to use &lt;font face="Courier New"&gt;IsInstalled()&lt;/font&gt; to determine if AJAX is installed in the web server, and couple dwith &lt;font face="Courier New"&gt;RegisterScriptManager&lt;/font&gt; Dotnetnuke will add the &lt;font face="Courier New"&gt;ScriptManager&lt;/font&gt; control to the page so that the module can use Ajax. The result of the previous example will be the same, but &lt;u&gt;without&lt;/u&gt; enabling partial rendering in the module.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff" size="2"&gt;If&lt;/font&gt;&lt;font size="2"&gt; DotNetNuke.Framework.AJAX.IsInstalled() &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Then&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font face="Courier New" color="#000000"&gt;DotNetNuke.Framework.AJAX.RegisterScriptManager()&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font face="Courier New" color="#008000" size="2"&gt;'Do some stuff&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff" size="2"&gt;End&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;If&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;/code&gt;&lt;/p&gt;</description>
      <link>http://nes.nesinteractivos.com/English/DúnadanBlog/tabid/56/EntryID/63/Default.aspx</link>
      <author>nestorsanchez@nesinteractivos.com</author>
      <comments>http://nes.nesinteractivos.com/English/DúnadanBlog/tabid/56/EntryID/63/Default.aspx#Comments</comments>
      <guid isPermaLink="true">http://nes.nesinteractivos.com/Default.aspx?tabid=56&amp;EntryID=63</guid>
      <pubDate>Thu, 18 Oct 2007 18:27:07 GMT</pubDate>
      <slash:comments>13</slash:comments>
      <trackback:ping>http://nes.nesinteractivos.com/DesktopModules/Blog/Trackback.aspx?id=63</trackback:ping>
    </item>
  </channel>
</rss>