C#项目中 如何使用vb作的web应用程序 :(在线等,解决了就结帖)

yuting627 2003-11-30 02:54:47
前提:web.config中—— default language=c#

问题:能不能在此项目中 直接使用vb作的 bbb.aspx,

1)、如能:是不是给 该bbb.aspx中 加上language=vb 就行了
2)、不能:是不是要从bbb.aspx中, 提出bbb.vb 来,用c# 写成ccc.aspx

什么意思:“c:\winnt\microsoft.net\framework\v1.0.3705\vbc /t:library /r:system.dll,system.web.dll C:\Inetpub\wwwroot\ex1\feature.vb” ?
怎么用 ? 在哪用 ?

这个问题困扰我三天了,请csdn的兄弟姐妹 不管高手、低手,都来帮帮吧 !



...全文
51 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
wenye822 2003-12-01
  • 打赏
  • 举报
回复
该题我一个多小时前就结帖 了 saucer(思归) 前辈66分
怎么还没显示呀???
yuting627 2003-11-30
  • 打赏
  • 举报
回复
万分感谢!!!
saucer 2003-11-30
  • 打赏
  • 举报
回复
>>>>这句写在哪里?

start->programs->microsoft visual studio .net->visual studio .net tools->visual studio .net command prompt

cd to C:\Inetpub\wwwroot\MyApplication1\news\, then run the above command

>>>>如何在c#项目中的aaa.aspx使用bbb.dll

copy the bbb.dll to the MyApplication1\bin subdirectory

if the classes in bbb.dll don't have a namespace, you can just use the classes, otherwise, you need to do in aspx page:

<%@ Import Namespace="YourNamespace" %>

in codebehind, you will do

using YourNamespace;

then

YourClass yc = new YourClass();

smalltree822 2003-11-30
  • 打赏
  • 举报
回复

“然后:如何在c#项目中的aaa.aspx使用vbc 编译的 bbb.dll”
可能没写清楚
smalltree822 2003-11-30
  • 打赏
  • 举报
回复
谢谢: saucer(思归) Kinli(动感磁场)
可是,我还是不太懂:
是不是可以用 vbc 将bbb.vb compile into bbb.dll (用这句话
c:\winnt\microsoft.net\framework\v1.0.3705\vbc /t:library /r:system.dll,system.web.dll C:\Inetpub\wwwroot\MyApplication1\news\bbb.vb” )——————这句写在哪里?
然后:如何在c#项目中的aaa.aspx使用bbb.dll

能不能请在细述一下!万分感谢!!!
Kinli 2003-11-30
  • 打赏
  • 举报
回复
在建项目之前应该新建一个"企业级模版项目", 这样才能在项目中使用不同语言编写的项目.
saucer 2003-11-30
  • 打赏
  • 举报
回复
1. if you are using vs.net, in the same project, you cannot use different languages in the codebehind

of course, you can always manually compile each codebehind file into a dll, then, you can use any .NET language in any page

2. vbc is vb.net compiler, the command will compile feature.vb into feature.dll

62,266

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧