Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > DotNetNuke > BOOK: Professional DotNetNuke Module Programming ISBN: 978-0-470-17116-5
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
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!
  #2 (permalink)  
Old April 26th, 2010, 04:30 PM
Wrox Author
 
Join Date: Jul 2008
Location: Des Moines, IA, USA.
Posts: 74
Thanks: 1
Thanked 8 Times in 8 Posts
Send a message via MSN to msellers Send a message via Skype™ to msellers
Default

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"
  #3 (permalink)  
Old April 27th, 2010, 08:35 AM
Authorized User
 
Join Date: Jan 2010
Posts: 29
Thanks: 0
Thanked 1 Time in 1 Post
Default

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.
  #4 (permalink)  
Old April 27th, 2010, 09:57 AM
Authorized User
 
Join Date: Jan 2010
Posts: 29
Thanks: 0
Thanked 1 Time in 1 Post
Default

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?
  #5 (permalink)  
Old April 27th, 2010, 10:03 AM
Friend of Wrox
 
Join Date: Dec 2008
Location: , , .
Posts: 238
Thanks: 2
Thanked 20 Times in 19 Posts
Default

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.
  #6 (permalink)  
Old April 27th, 2010, 10:37 AM
Authorized User
 
Join Date: Jan 2010
Posts: 29
Thanks: 0
Thanked 1 Time in 1 Post
Default

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.
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 07: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



All times are GMT -4. The time now is 10:08 AM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.