::::
::English :: Dunadan Blog
Module Border Module Border
  Categories   Minimize

Module Border Module Border
Module Border Module Border
  Renata's Pics   Minimize

Module Border Module Border
Module Border Module Border
  Dunadan's Blog   Minimize

Author: Dunadan Raptor Created: Friday, April 27, 2007 1:37 PM
Something happens everyday, everyday something's worth remembering.

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: http://www.builderau.com.au/program/sqlserver/soa/Restore-your-SQL-Server-database-using-transaction-logs/0,339028455,339282046,00.htm

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.

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.

For example to delete the MyFile.ascx file, just include its name in the .txt file. If the file is within a directory like /DesktopModules/MyModule/MySubDirectory/MyFile.ascx, remove the DesktopModules/MyModule path to obtain only a path relative to the module folder: MySubDirectory/MyFile.ascx.

 

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 this previous post.

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.

<asp:UpdatePanel ID="UpdatePanel1" runat="server"><ContentTemplate>

<asp:Label ID="Label1" runat="server" Text="Label">asp:Label><br /><asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" />ContentTemplate>asp:UpdatePanel>

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:

<asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1">asp:UpdateProgress>

In the Progress Template element add an Image control with its ImageUrl property value pointing to your animated image.

 <ProgressTemplate><asp:image id="updating1" Imageurl="~/DesktopModules/MyModule/Images/LoadingIcon.gif" runat="server"/>ProgressTemplate>

The final markup should look like this:

<asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1"><ProgressTemplate><asp:image id="updating1" Imageurl="~/DesktopModules/MyModule/Images/LoadingIcon.gif" runat="server"/>ProgressTemplate>asp:UpdateProgress>

 

<asp:UpdatePanel ID="UpdatePanel1" runat="server"><ContentTemplate>

<asp:Label ID="Label1" runat="server" Text="Label">asp:Label><br /><asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" />ContentTemplate>asp:UpdatePanel>

The best part about working with declarative programming is that you will not need to recompile your code.

 

 

 

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 this post 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.

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.

I hope this helps someone else not to lose so many hours with something so obvious.

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.

Use Control Definitions
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:

1) Adding the line below to the control node of a control in the .dnn manifest:

<supportspartialrendering>truesupportspartialrendering>

 2) Select de checkbox for Supports Partial Rendering 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>Module Definitions>.

When the Partial rendering is enabled, the Microsoft Ajax Library can be used as well as the popular Control Toolkit.

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.

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.

System.Threading.Thread.Sleep(3000)

Label1.Text = DateTime.Now()

Label2.Text = DateTime.Now()

Clicking on the button shpould only update the datetime value of the label inside the update panel while the first one is unchanged.

Developer control
Remember that there can exist one and only one ScriptManager 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 Dotnetnuke.Framework.Ajax class does. The class has 8 methods besides its constructor:

Taken from the class documentation:

  1. AddScriptManager:

    AddScriptManager is used internally by the framework to add a ScriptManager control to the page

  2. ContentTemplateContainerControl

    ContentTemplateContainerControl gets a reference to the ContentTemplateContainer control within an UpdatePanel

  3. CreateUpdatePanelControl:

    UpdatePanelControl dynamically creates an instance of an UpdatePanel control

  4. IsInstalled:

    IsInstalled can be used to determine if AJAX is installed on the server

  5. RegisterScriptManager:

    RegisterScriptManager must be used by developers to instruct the framework that AJAX is required on the page

  6. RemoveScriptManager:

    RemoveScriptManager will remove the ScriptManager control during Page Render if the RegisterScriptManager has not been called

  7. ScriptManagerControl:

    ScriptManagerControl provides a reference to the ScriptManager control on the page

  8. SetScriptManagerProperty:

    SetScriptManagerProperty uses reflection to set properties on the dynamically generated ScriptManager control

It is possible to use IsInstalled() to determine if AJAX is installed in the web server, and couple dwith RegisterScriptManager Dotnetnuke will add the ScriptManager control to the page so that the module can use Ajax. The result of the previous example will be the same, but without enabling partial rendering in the module.

If DotNetNuke.Framework.AJAX.IsInstalled() Then

DotNetNuke.Framework.AJAX.RegisterScriptManager()

'Do some stuff

End If

While embarking on a project to create DNN modules with Visual Studio Team System developoment lifecycle support, I noticed that the Sharepoint Team Portal that is created for a project uses Office documents in an older version.

SPS is nothing more than an application that runs over IIS, I imagined that someone should have already created a mapping workaround. Luckily David Overtone and MVP from the UK has already done it in this post. Although the process is manual, it supports displaying Office 2007 icons and document mappings in Sharepoint in 3-4 easy steps:

  1. Load the icon library into the SPS web extensions directory.
  2. Adding mappings for the icons in the corresponding SPS XML file.
  3. Running a vbscript to register the MIME types in the metabase of IIS.
  4. (optional) Disable ReadOnly when clicking Open in the browser.

MIT's John Maeda wrote a book called Laws Of Simplicity. The rules are expressed in simple words:

  1. Reduce
  2. Organize
  3. Save Time
  4. Learn
  5. Differences
  6. Context
  7. Emotion
  8. Trust
  9. Failure
  10. The One

You will have to visit his blog to know what those are all about, but in the talk above at TED he sums it all up one nice rule: Enjoy life more but with less pain.

Judging from the content of this article, Microsoft is updating PC's that run windows XP or Vista without user consent. Meaning that even users that have Update Services turned off are subject to this activity. The article was published by the reputable eWeek absed on a report by Windows Secrets.

The article was published on September 12 and no official response has been released by Microsoft.

A few weeks ago Chris Paterra told me he wanted to sponsor me into Project Lead for the Gallery Module Project. This week I was given apropriate access and attended my first Core Team chat. I've already started blogging and taking care of some needed project tasks to re-start development. To keep you updated I have added a feed to the home page of my site and of course you can read my blog at DNN here.

In the next few weeks I will be merging the content from DNNLA into this site. I am still trying to define the final structure and process to publish those resources. Some DNN articles are in english and I haven't received requests to have them in spanish, which is surprising. But I am sure some will be presented in both languages.

I am envisioning the creation of a Forum using the next release of the core version Chris Paterra is working on. In the meantime if anyone's got any suggestions for the site, feel free to post them.

Just finished playing for a couple of minutes and after I sent my score of 4000 points I saw the top 2 players had 2 thousand MILLION points. Either they are really great or found a way to crack it taking the fun out of it. Anyway go ahead and Play Triangles!!!

Dave M Bush published recently a tutorial that is kind of an hybrid between having a PA and using the Codebeside model from dynamic compilation. It's interesting to see the use of the MSBuild tool and compare it to the way it is used to build the PA. I have been using nAnt to build and create my PAs (Both source and install) reusing build files from the core modules. I have not used Bush's method but I will study it to see if something can come up for an improved development environment.ç

The article can be found here: http://www.dmbcllc.com/Articles/WebDevelopment/DotNetNukePAwASPNET20/tabid/260/Default.aspx

Module Border Module Border