Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > DotNetNuke > BOOK: Professional DotNetNuke Module Programming ISBN: 978-0-470-17116-5
BOOK: Professional DotNetNuke Module Programming ISBN: 978-0-470-17116-5
This is the forum to discuss the Wrox book Professional DotNetNuke Module Programming by Mitchel Sellers and Shaun Walker - Wrox DotNetNuke Series Editor; ISBN: 978-0-470-17116-5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional DotNetNuke Module Programming ISBN: 978-0-470-17116-5 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old April 26th, 2010, 04:15 PM
Authorized User
Join Date: Jan 2010
Posts: 29
Thanks: 0
Thanked 1 Time in 1 Post
Default Ajax - System.Web.Extensions, .NET target version needs to be 3.5

Attempting to utilize the AjaxControlToolkit (April 2010 version) in a new module.

I read your blog and need clarification. I can't add the two references (System.Web.Extensions.dll and AjaxControlToolkit.dll) to my module b/c it tells me my specified target .NET platform is not compatible. My core website is in fact targeting 3.5 and has the System.Web.Extensions reference. (Web site is 3.5, module environment isn't). The module is default so far, as created by the VS project template. I looked at the included references and project properties and see mostly all 2.0 .NET items and no super obvious way to toggle .NET versions. I eventually went into the advanced compile options and found a way to force the module to run in .NET 3.5. That added a web.config to the local module folder. Had to comment out the authentication line but after that, the site at least continued working. Once I did that, I could add the two references. I've spent all day researching this and haven't found any one instructing to use this method so naturally I'm doubting my procedure. I'm facing a mental disconnect between the new module and the parent site to which it belongs. Why doesn't VS 2008 know the module is targeting 3.5?

Next problem: I followed several tutorials and any time I use one of the ajax toolkit controls, I get an error message telling me the script manager isn't the right one. I tried adding the toolkitScriptManager to the page and this causes different errors. So, if I use the dnn approach listed in the book to programatically wrap an asp:panel inside of an updatePanel, it's the wrong type of ScriptManager for the controls. If I use the ToolkitScriptManager, it still doesn't work. In a nutshell, the DotNetNuke.Framework.AJAX.RegisterScriptManager() is not compatible with the AJAX ControlToolKit.

Have you had time to work with the AJAX toolkit? Would you mind asking a few people at headquarters if they've had a chance to play with the April 2010 edition of the AJAX toolkit in any of their dnn modules?

Thanks a lot!
Old April 26th, 2010, 04:30 PM
Wrox Author
Join Date: Jul 2008
Posts: 74
Thanks: 1
Thanked 8 Times in 8 Posts
Send a message via MSN to msellers

You need to go into the project properties and change the target to be .NET 3.5 rather than 2.0
Mitchel Sellers
Microsoft C# MVP, MCITP
Director of Development
IowaComputerGurus Inc.

My blog for .NET and DotNetNuke info

Author of "Professional DotNetNuke Module Programming"

Tech Editor on "Visual Studio 2010 six-in-one" and "Pro C# 4.0"
Old April 27th, 2010, 08:35 AM
Authorized User
Join Date: Jan 2010
Posts: 29
Thanks: 0
Thanked 1 Time in 1 Post

Bear with me - how do I change the target environment?

When you create the new 'DotNetNuke Compiled Module' in VS 2008, on the first screen where you pick the location and give your project a name, up on the top right there is a dropdown box where you pick the framework. Mine defaults to 3.5.

Looking at my already created project, I double click on "My Project" to get to the tabbed interface for project properties. I'd expect the target environment to be toggled on the first tab, "Application", but it's not there. See page 51 in the book as a quick reference.

No where in Project Properties does it offer me a choice of .NET frameworks.
Old April 27th, 2010, 09:57 AM
Authorized User
Join Date: Jan 2010
Posts: 29
Thanks: 0
Thanked 1 Time in 1 Post

I think I did the correct method to change the target environment to 3.5 when I changed the advanced compile options.

The Ajax Control Toolkit - the controls require you to use the ToolkitScriptManager instead of the asp:ScriptSanager. When I add one to my page, I get this error: "Only one instance of a ScriptManager can be added to the page." Which makes sense b/c the DNN core is adding its own ScriptManager.

How do I use the ToolkitScriptManager?
Old April 27th, 2010, 10:03 AM
Friend of Wrox
Join Date: Dec 2008
Posts: 238
Thanks: 2
Thanked 20 Times in 19 Posts

Put either ToolkitScriptManager or ScriptManager on your web page, and both of them work with 3.5. ToolkitScriptManager gives you extra benefits such as combining javascript etc.
Old April 27th, 2010, 10:37 AM
Authorized User
Join Date: Jan 2010
Posts: 29
Thanks: 0
Thanked 1 Time in 1 Post

I downloaded the October 2009 version of the toolkit and this one works great. DNN doesn't appear to work with the April 2010 release.

Thank you both for your help.

Similar Threads
Thread Thread Starter Forum Replies Last Post
AJAX Extensions ghosted tomche ASP.NET 3.5 Basics 1 April 26th, 2009 04:10 AM
AJAX Extensions ilegend .NET Framework 3.5 1 September 19th, 2008 03:32 AM
Chapter 2 c# version, system.net query Judy BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 9 January 16th, 2008 08:57 AM
erro installing ASP.NET 2.0 AJAX Extensions 1.0 bishnupokhrel ASP.NET 2.0 Professional 7 May 31st, 2007 11:40 PM
Request for the permission of type 'System.Net.Web paranthaman ASP.NET 1.0 and 1.1 Professional 1 August 21st, 2006 10:16 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.