用C#和放asp.net web应用; vb.net无论是在codebehind [英] asp.net web application with c# & vb.net both in codebehind

查看:144
本文介绍了用C#和放asp.net web应用; vb.net无论是在codebehind的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们现在有一个asp.net网站,在VB.Net和放大器开发了一些模块;一些在C#中(不只是类,但也有个别aspx页面和code后面)。我们估计,我们希望,我们需要实现与CI TFS移动到网络应用模式。

We currently have a asp.net website with some modules developed in VB.Net & some in C# (not just classes but also individual aspx pages and code behind). We figured we wanted to move to web application model as we need to implement CI with TFS.

问题:

当我们创建了一个C#Web应用程序,从网站和放大器复制文件;说转换成Web应用程序它给无法解析错误(可能是因为文件是vb.net文件)

When we create a C# web application, copy the files from website & say convert to web application it gives Could not Parse errors (probably because files are vb.net files)

当我们创建一个VB.NET Web应用程序,复制文件和放大器;说转换成Web应用程序将其转换只能vb.net页&安培;在出版上所有的C#页面抛出错误说未能加载类型

When we create a VB.NET web application, copy the files & say convert to web application it converts only vb.net pages & on publishing throws error on all c# pages saying Could not load type

在asp.net网站将与多个codebehind语言支持正常工作。

The asp.net website would work properly with multiple codebehind language support.

帮助将是非常美联社preciated!

Help would be highly appreciated!

推荐答案

你能打破应用成本是同根目录下运行2个独立的web应用程序?只要把符合C#中的DLL编译VB.net DLL垃圾桶,并把所有的aspx页面的任何地方,他们将需要为您的网站的结构。

Can you break the app into 2 separate web applications that run from the same root directory? Just put the complied C# dll in the bin with the compiled VB.net dll and place all of the aspx pages wherever they would need to be for your site structure.

我还没有尝试过这个自己,但它应该工作。你必须创建一个单独的项目,并引用任何数据层等,就在C#code移动到新的应用程序,并看到如何继续下去。不是最好的解决办法,但它打败了从一种语言转换为另一种。

I haven't tried this myself, but it should work. You'll have to create a separate project and reference any data layers, etc. Just move the C# code to the new app and see how that goes. Not the best solution, but it beats converting from one language to another.

这篇关于用C#和放asp.net web应用; vb.net无论是在codebehind的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆