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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0dnn 4.3.4 and c# modules templatednn 4.3.4 and c# modules template
Previous
 
Next
New Post
8/24/2006 2:45 PM
 
Hello folks!  This is my first post here!  Love what the community is doing!

My question is this:  I just created a new dnn module in c# from the VS2005 template library as per the instructions on http://www.adefwebserver.com/DotNetNukeHELP/DNN_Module4/DotNetNuke_module_2.htm

I got all the way to the 'build your website' with no problems, and now I'm getting an unusual error.  It says that ,"The files'/dotnetnuke4dev/App_Code/AssemblyInfo.vb' use a different language, which is not allowed since they need to be compiled together"

I translated the file from vb into c# as best I could.  That seemed to work, but not it says that Global.asax.vb also needs to be in C#.  The file is long and complicated, and I am not very VB literate.  Is there something I did wrong when creating the module?  How do I fix this, and even if I changes global.asax.vb into glabal.asax.cs, will that even work?

HELP!
 
New Post
8/24/2006 3:14 PM
 

brahoc wrote
Hello folks!  This is my first post here!  Love what the community is doing!

My question is this:  I just created a new dnn module in c# from the VS2005 template library as per the instructions on http://www.adefwebserver.com/DotNetNukeHELP/DNN_Module4/DotNetNuke_module_2.htm

I got all the way to the 'build your website' with no problems, and now I'm getting an unusual error.  It says that ,"The files'/dotnetnuke4dev/App_Code/AssemblyInfo.vb' use a different language, which is not allowed since they need to be compiled together"

I translated the file from vb into c# as best I could.  That seemed to work, but not it says that Global.asax.vb also needs to be in C#.  The file is long and complicated, and I am not very VB literate.  Is there something I did wrong when creating the module?  How do I fix this, and even if I changes global.asax.vb into glabal.asax.cs, will that even work?

HELP!

 

Yeah its simple enough. Open up your web.config file and add your module name to the codeSubDirectories section as seen below.

<codeSubDirectories>

<add directoryName="Reports" />

<add directoryName="YourModuleNameGoesHere!" />

</codeSubDirectories>

Then rebuild the website. That should take care of it.

Let me know if you need any further assistance as I also use C#.

 


Cheers!
John Valentine
http://www.webinnovationsystems.com
 
New Post
8/24/2006 3:42 PM
 
Thanks a bunch!  That was it.  Hopefully when I become more familiar with DNN and its inner workings I'll be able to figure those things out on my own. 

BTW, I found another error in the template when using dnn 4.3.4 template and c#.  Minor, and easily corrected.  In the viewmodulename.ascx.cs

  protected void lstContent_ItemDataBound(System.Object sender, System.Web.UI.WebControls.DataListItemEventArgs e)
        { ...

              if (strContent.IndexOf("[" & objPropertyInfo.Name.ToUpper() & "]") != -1)
              ...        }

should be

  if (strContent.IndexOf("[" + objPropertyInfo.Name.ToUpper() + "]") != -1)

Where do I report such errors?
 
New Post
8/24/2006 5:08 PM
 

Well, you could report them to the DNN core team, but I don't think this one is really all that bad. Most of the time the developer is going to replace the contents of the ItemDataBound event with their own.

For instance, the developer will want to use this lister to display a custom template that would be defined in the ascx file. Look into ItemTemplates and AlternatingItemTemplates if you are unfamiliar with the asp:DataList control. Its sort of a more highly evolved Repeater control...

I use boxing to find and assign values to the controls located in these templates.


Cheers!
John Valentine
http://www.webinnovationsystems.com
 
New Post
8/24/2006 6:12 PM
 

brahoc wrote
Thanks a bunch!  That was it.  Hopefully when I become more familiar with DNN and its inner workings I'll be able to figure those things out on my own. 

BTW, I found another error in the template when using dnn 4.3.4 template and c#.  Minor, and easily corrected.  In the viewmodulename.ascx.cs

  protected void lstContent_ItemDataBound(System.Object sender, System.Web.UI.WebControls.DataListItemEventArgs e)
        { ...

              if (strContent.IndexOf("[" & objPropertyInfo.Name.ToUpper() & "]") != -1)
              ...        }

should be

  if (strContent.IndexOf("[" + objPropertyInfo.Name.ToUpper() + "]") != -1)

Where do I report such errors?

Thanks, that error was found and fixed already, and will be included in the 4.3.5 starterkit. FYI: you can record any future bugs/enhancement requests at the public issuelog @ http://support.dotnetnuke.com/project/Project.aspx?PROJID=23

Cathal


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0dnn 4.3.4 and c# modules templatednn 4.3.4 and c# modules template


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