473,574 Members | 2,581 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Hi! Having Problem while placing vb and cs files together

If i place vb and cs class files together in App_Code in asp.net 2.0 i
get error that i can't place as they us a different language which is
not allowed as they have to be complied together.

Is there any solution???

Jul 22 '06 #1
7 1458
I am not aware of any solution for creating a secondary App_code
folder. I think the solution would be to translate the smallest
(/easiest) code file :-(

shwetu wrote:
If i place vb and cs class files together in App_Code in asp.net 2.0 i
get error that i can't place as they us a different language which is
not allowed as they have to be complied together.

Is there any solution???
Jul 22 '06 #2
The single App_Code directory can only contain files of the same language.

However, you can add subdirectories to the App_Code directory
in order to process multiple languages under the App_Code directory.

In order to do this, you need to register each subdirectory in the application's Web.config.

<configuratio n>
<system.web>
<compilation debug="false">
<codeSubDirecto ries>
<add directoryName=" VB"/>
<add directoryName=" CS"/>
</codeSubDirector ies>
</compilation>
</system.web>
</configuration>

Then, simply creating the App_Code\VB and App_Code\CS directories,
and placing your VB and CS files in each, will allow you to use both languages in your app.

This only works in ASP.NET 2.0! ( and is quite easy to implement )


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"Jacob" <ja***@reimers. dkwrote in message
news:11******** **************@ i3g2000cwc.goog legroups.com...
>I am not aware of any solution for creating a secondary App_code
folder. I think the solution would be to translate the smallest
(/easiest) code file :-(

shwetu wrote:
>If i place vb and cs class files together in App_Code in asp.net 2.0 i
get error that i can't place as they us a different language which is
not allowed as they have to be complied together.

Is there any solution???

Jul 22 '06 #3
Hi!
Thx Juan T. Llibre!!
The solution worked !!!!!

Juan T. Llibre wrote:
The single App_Code directory can only contain files of the same language.

However, you can add subdirectories to the App_Code directory
in order to process multiple languages under the App_Code directory.

In order to do this, you need to register each subdirectory in the application's Web.config.

<configuratio n>
<system.web>
<compilation debug="false">
<codeSubDirecto ries>
<add directoryName=" VB"/>
<add directoryName=" CS"/>
</codeSubDirector ies>
</compilation>
</system.web>
</configuration>

Then, simply creating the App_Code\VB and App_Code\CS directories,
and placing your VB and CS files in each, will allow you to use both languages in your app.

This only works in ASP.NET 2.0! ( and is quite easy to implement )


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"Jacob" <ja***@reimers. dkwrote in message
news:11******** **************@ i3g2000cwc.goog legroups.com...
I am not aware of any solution for creating a secondary App_code
folder. I think the solution would be to translate the smallest
(/easiest) code file :-(

shwetu wrote:
If i place vb and cs class files together in App_Code in asp.net 2.0 i
get error that i can't place as they us a different language which is
not allowed as they have to be complied together.

Is there any solution???
Jul 29 '06 #4
Glad to know you're up and running, shwetu!

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"shwetu" <sh************ *@gmail.comwrot e in message
news:11******** *************@i 3g2000cwc.googl egroups.com...
Hi!
Thx Juan T. Llibre!!
The solution worked !!!!!

Juan T. Llibre wrote:
The single App_Code directory can only contain files of the same language.

However, you can add subdirectories to the App_Code directory
in order to process multiple languages under the App_Code directory.

In order to do this, you need to register each subdirectory in the application's Web.config.

<configuratio n>
<system.web>
<compilation debug="false">
<codeSubDirecto ries>
<add directoryName=" VB"/>
<add directoryName=" CS"/>
</codeSubDirector ies>
</compilation>
</system.web>
</configuration>

Then, simply creating the App_Code\VB and App_Code\CS directories,
and placing your VB and CS files in each, will allow you to use both languages in your app.

This only works in ASP.NET 2.0! ( and is quite easy to implement )


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"Jacob" <ja***@reimers. dkwrote in message
news:11******** **************@ i3g2000cwc.goog legroups.com...
I am not aware of any solution for creating a secondary App_code
folder. I think the solution would be to translate the smallest
(/easiest) code file :-(

shwetu wrote:
If i place vb and cs class files together in App_Code in asp.net 2.0 i
get error that i can't place as they us a different language which is
not allowed as they have to be complied together.

Is there any solution???

Jul 29 '06 #5
"Juan T. Llibre" <no***********@ nowhere.comwrot e in message
news:OR******** ******@TK2MSFTN GP03.phx.gbl...

Juan,
Then, simply creating the App_Code\VB and App_Code\CS directories,
and placing your VB and CS files in each, will allow you to use both
languages in your app.

This only works in ASP.NET 2.0! ( and is quite easy to implement )
Does this also work for code files placed in other folders? E.g.

<webroot>
<App_Code>
<App_Code\VB>
MyClass.vb
<App_Code\CS>
MyClass.cs
<home>
default.aspx
default.aspx.vb
<welcome>
default.aspx
default.aspx.cs

Mark
Jul 29 '06 #6
re:
Does this also work for code files placed in other folders? E.g.
<home>
default.aspx
default.aspx.vb
<welcome>
default.aspx
default.aspx.cs
No, Mark.

You can't place *.vb and .cs files in different directories
of your app and expect them to compile [ wouldn't that be nice... :-) ]

The VB/CS code subdirectories are *only* for class files.
The code in each of the dirs declared in web.config will be compiled to a separate assembly.

An alternate way to handle this would be to compile your different-language source code
to an assembly which you place in the /bin directory, and not upload the source files at all.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"Mark Rae" <ma**@markNOSPA Mrae.comwrote in message news:OD******** ******@TK2MSFTN GP02.phx.gbl...
"Juan T. Llibre" <no***********@ nowhere.comwrot e in message
news:OR******** ******@TK2MSFTN GP03.phx.gbl...

Juan,
>Then, simply creating the App_Code\VB and App_Code\CS directories,
and placing your VB and CS files in each, will allow you to use both languages in your app.

This only works in ASP.NET 2.0! ( and is quite easy to implement )

Does this also work for code files placed in other folders? E.g.

<webroot>
<App_Code>
<App_Code\VB>
MyClass.vb
<App_Code\CS>
MyClass.cs
<home>
default.aspx
default.aspx.vb
<welcome>
default.aspx
default.aspx.cs

Mark

Jul 29 '06 #7
"Juan T. Llibre" <no***********@ nowhere.comwrot e in message
news:OT******** ******@TK2MSFTN GP02.phx.gbl...
re:
>Does this also work for code files placed in other folders? E.g.
<home>
default.aspx
default.aspx.vb
<welcome>
default.aspx
default.aspx.cs

No, Mark.

You can't place *.vb and .cs files in different directories
of your app and expect them to compile [ wouldn't that be nice... :-) ]
Hurrah! That's precisely what I was hoping you'd say! Long story, but thank
God for that!
The VB/CS code subdirectories are *only* for class files.
The code in each of the dirs declared in web.config will be compiled to a
separate assembly.
Makes sense, now you come to mention it...
An alternate way to handle this would be to compile your
different-language source code
to an assembly which you place in the /bin directory, and not upload the
source files at all.
Or, even better, just stick to C#... :-)

<ducks and covers>
Jul 29 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
12513
by: matthurne | last post by:
I just started learning C++ on my own...I'm using Accelerated C++. Something it hasn't explained and I keep wondering about is how header files actually work. I suspect it doesn't get into it because it is, as the authors love to say, "implementation specific". If that's the case, how does the compiler commonly handle them? I use Linux and...
1
1613
by: Christopher M. Lusardi | last post by:
Hello, I have a program that can be compiled and run on SGI and Linux computers, and only one of the files in the program has is different. On the SGI system, the file has a dot capital C suffix, and on Linux it has a dot lower case c suffix. When I put both files in one file and surround them with precompiler directives such as #if SGI...
1
2974
by: Trent | last post by:
Hello,everyone. I'm setting a db2 replication environment using UDB version 8.1.5 running on Windows 2000 servers. The source server is on a Windows server with the capture program running while the target server is on another Windows server running the apply program. This replication set up has a mix of bidirectional and unidirection data...
6
2865
by: Jamal | last post by:
I am working on binary files of struct ACTIONS I have a recursive qsort/mergesort hybrid that 1) i'm not a 100% sure works correctly 2) would like to convert to iteration Any comments or suggestion for improvements or conversion to iteration would be much appreciated
2
2811
by: Dickyb | last post by:
Extracting an Icon and Placing It On The Desktop (C# Language) I constructed a suite of programs in C++ several years ago that handle my financial portfolio, and now I have converted them to C#. The only significant problem that I have encountered in the conversion is this one - extracting an icon from the 'KTEntryPoint' program into...
0
1629
by: just.starting | last post by:
I am having problem while downloading files from an apache server2.0.53 with php4.3.10.While downloading some files it generally stops after downloading some specific amount and then stops downloading with the error message: "the source file could not be read". And the error is not dependent on the size of the file, as I can download a file of...
14
19403
by: Jan Schmidt | last post by:
Hi, in a nested do-while-loop structure I would like to "continue" the outer loop. With goto this should be no problem in while-loops. However, for do-while I cannot get it to work (without a strange workaround construct): -- do { // ...
2
1846
by: Brian A. Cline | last post by:
After placing several images in an embedded resource file, the size of my program's executable has jumped considerably. I don't need these images until a specific dialog pops up, and it's possible that may never happen in the majority of cases. What would be the best way to go about placing these images in a separate resource that gets...
2
1694
by: neovantage | last post by:
hey all, I need to get the German Time while placing an order through my application. My application is hosted in USA so it get USA Server time while placing an order so that i want it take german time. How can i do that in php. Kindly help me out to sort out my problem. I will be very grateful to him/her. kind regards, Mohsin Rafique
0
7807
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8058
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8241
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7820
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8100
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6456
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5624
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3742
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1344
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.