Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesDNN and PokeIn (referencing problem?)DNN and PokeIn (referencing problem?)
Previous
 
Next
New Post
7/16/2010 2:55 PM
 
I am currently trying to write a module which uses the PokeIn comet library (pokein.codeplex.com). My plan was to move the code from the PokeIn sample project (which compiles/runs fine) to a module and then modify it. While I have some previous experience writing DNN modules, I never worked with ASP .NET on its own, so the concept of adding libraries and referencing in ASP .NET is fairly new to me.

The problem I am having is that despite being referenced properly (as far as I can tell), I cannot access PokeIn from any inline scripts within ascx or aspx files in the project (which I made with the DNN Starter Kit). For example:

<%
    'Check UserLogin etc
    PokeIn.Comet.CometWorker.Handle(Me)
%>

gives the error: "Name 'PokeIn' is not declared." However if I move exactly the same code anywhere in the code-behind file, it shows no errors. I get the same thing if I try to call Dotnetnuke.X.X... from inline scripts. If I add:

<%@ Import Namespace="PokeIn" %>

before the code, I get the warning: "Namespace or type specified in the Imports 'PokeIn' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases."

Along with the warning I also get the same "not declared" error for PokeIn. The strange thing is that despite all this, I can build and run the project (even though it doesn't actually work).

Normally I wouldn't be using inline scripting, but the PokeIn samples use it in certain places, and it doesn't seem to work when I move it to the Page_Load function or something similar, although it has no errors when it's in the code-behind.

I'm not really sure where to start with this problem, I assume it has something to do with the type of project created by the Starter Kit, but only because the PokeIn sample works fine.

Any help at all would be appreciated.


 
New Post
7/16/2010 7:20 PM
 
Your error is likely to be a failure to give the correct namespace - from a quick look at their codeplex site class diagram (http://pokein.codeplex.com/SourceControl/changeset/view/e21206ca95f1#ClassDiagram.cd), they seem to use PokeIn.Comet as their namespace with the relevant class's e.g. if you're using CometWorker the fully qualified declaration would be PokeIn.Comet.CometWorker

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
7/21/2010 8:50 AM
 
Thanks for the reply.

I'm pretty sure it's not the wrong namespace, since I've tried the one you mentioned (PokeIn.Comet.CometWorker), as well as PokeIn and PokeIn.Comet. Also, as mentioned before, I've put exactly the same code in the codebehind and there is no error. The autocomplete in VS2008 even finds it in the codebehind before I start typing, whereas in the inline section, PokeIn is not in the autocomplete list (and neither is DotNetNuke for that matter).
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesDNN and PokeIn (referencing problem?)DNN and PokeIn (referencing problem?)


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out