Saturday, July 31, 2010
  Search
 
Register
Login
 
How to Utilize AjaxToolKit with DotNetNuke Portals
Integrating the AjaxToolkit into DotNetNuke modules is super easy. But, can be frustrating if you're not sure how. Find out how to Ajax enable your modules in less than 5 minutes now!   The ...

Find this article and more in the Module Development category

Read This Article . . .

Simple Intro to the DNN UserInfo Class
 New DNN developers often wonder how to expose information about logged in users to a custom DotNetNuke module. So, I threw together a very simple example to show how easy it is to begin using the bu...

Find this article and more in the DotNetNuke category

Read This Article . . .

New "Styles" SkinObject Found in DotNetNuke 4.9
One more addition has been added to the developer's DotNetNuke skinning toolbox with the release of DotNetNuke 4.9. Introducing...the Styles SkinObject. This little object is a very welcome addition ...

Find this article and more in the DotNetNuke category

Read This Article . . .

How To Customize the Privacy and Terms Links on Your DotNetNuke Portal
Straight out of the box, DotNetNuke already has a lot of things covered. But, what do you do when you are ready to begin customizing your site. Sometimes, it’s not so easy to figure out how to make t...

Find this article and more in the category

Read This Article . . .

Resolving Troubles with DNN User Controls During Module Development & Compilation
So, you've created a module in a separate project using some DNN User Controls and now you're receiving errors and can't compile? If you are using these controls (list below) on your module using ...

Find this article and more in the category

Read This Article . . .

Quick Check for Troubleshooting the CodeEndeavor Ajax Templates
I haven’t just installed the the template and created a module out of the box yet. However, I have come across a few things that I know to check and fix and I’m up and running in no time at all. If y...

Find this article and more in the category

Read This Article . . .

Quick Check for Troubleshooting the CodeEndeavor Ajax Templates
I haven’t just installed the the template and created a module out of the box yet. However, I have come across a few things that I know to check and fix and I’m up and running in no time at all. If y...

Find this article and more in the category

Read This Article . . .

How to Use the DNNLabelEdit Control
 It's easy to use the DNNLabelEdit control, you know the one you mouse over and edit in place? Yeah, that one. In just a few minutes, you can begin using the control on your sites as well for full on...

Find this article and more in the Module Development category

Read This Article . . .

Generate a Module Data Access Layer With CodeSmith
With the introduction of some of the newer DNN tools, building a custom module is becoming more and more easy. With the right tools, you can have a custom module built in no time flat. This will outl...

Find this article and more in the DotNetNuke category

Read This Article . . .

Getting Started with Code Endeavors Ajax Compiled Module Template
DotNetNuke Ajax development just got easy thanks to Jon Henning and his Ajax Compiled Module templates. He’s got them listed on CodePlex, they’re updated for DNN 5, and they are available in C# and V...

Find this article and more in the category

Read This Article . . .

Search for Articles

Virtual-Essential's DotNetNuke, .NET, and SQL Tips For the Developer

Minimize
Mar 20

Written by: Briana Tarrance
3/20/2009 11:14 AM 

 

If you've ever stumbled across a great piece of code that you wanted to integrate into your web app, but found it in the language that your NOT currently coding in,

there's an easy way to use it without having to rewrite the code in your current application's language.

In the web application file directory, create an additional folder for the other language. See in the image below that I have a folder for C# files and another for

VB.NET files.

CombinedCSAndVBCodeInWebApplication

Then, in your web.config modify the <compilers> section so that it shows both of these elements. You should only have one of these initially reflecting the language you're coding in.

<system.codedom>
    <compilers>
        <compiler language="vb;vbs;visualbasic;vbscript" type="Microsoft.VisualBasic.VBCodeProvider, 
System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" extension=".vb" warningLevel="4">
            <providerOption name="CompilerVersion" value="v3.5"/>
            <providerOption name="OptionInfer" value="true"/>
            <providerOption name="WarnAsError" value="false"/>
        </compiler>
        <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider,
System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
            <providerOption name="CompilerVersion" value="v3.5"/>
            <providerOption name="WarnAsError" value="false"/>
        </compiler>
    </compilers>
</system.codedom>

Then, under the <compilation> section add a directoryName for the App_Code folders you created. One for each language type.   
    


<compilation debug="true" strict="false">
....
      <codeSubDirectories>
          <add directoryName="myVBCode"/>
            <add directoryName="myCSCode"/>
        </codeSubDirectories>
....
</compilation>

And that's it. Compile, browse and your done. Voila!

Very easy, huh?

Tags:

Your name:
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Title:
Comment:
Security Code
Enter the code shown above in the box below
Add Comment   Cancel 
 
 
Copyright 2008 by Virtual-Essentials.com Privacy Statement    Terms Of Use