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.