asp调用net2005类
2008-03-26 13:06
169 查看
问题:asp代码如何访问net2005里的类?
1.我自定义了一个类:
using System;
namespace hello
{
public class HelloWorld
{
public string getUserInfo(string s)
{
return "HelloWorld";
}
}
}
编译得到:hello.dll
采用 regasm.exe hello.dll 注册dll
然后我写asp代码如下:
<%
Set cls1 =CreateObject("hello.HelloWorld")
response.write(cls1.getUserInfo())
%>
此时可以正确返回“HelloWorld”串。
1.我自定义了一个类:
using System;
namespace hello
{
public class HelloWorld
{
public string getUserInfo(string s)
{
return "HelloWorld";
}
}
}
编译得到:hello.dll
采用 regasm.exe hello.dll 注册dll
然后我写asp代码如下:
<%
Set cls1 =CreateObject("hello.HelloWorld")
response.write(cls1.getUserInfo())
%>
此时可以正确返回“HelloWorld”串。
相关文章推荐
- 在vb和asp中调用c#生成的.net的dll
- 巧用ASP.NET预编译Web应用程序规避调用延迟的方法
- asp.net 2010中jquery调用webservice
- asp.net 2010中jquery调用webservice
- asp.net 2010中jquery调用webservice
- asp.net 2010中jquery调用webservice
- ASP.Net MVC C#画图 页面调用
- asp.net 2010中jquery调用webservice
- asp.net 2010中jquery调用webservice
- asp.net数据库连接,三层架构方法调用
- asp.net 2010中jquery调用webservice
- ASP与存储过程(Stored Procedures)的文章.可以通command,recodset ,connecting分别调用
- ASP.Net访问母版页(MasterPage)控件、属性、方法及母版页中调用内容页的方法
- 使用ASP.NET AJAX异步调用Web Service和页面中的类方法(10):服务器端和客户端数据类型的自动转换:以XML方式序列化数据、小结
- jquery.Ajax()方法调用Asp.Net后台的方法解析
- ASP.NET 调用Excel模版,导出Excel文件
- asp.net 调用存储过程
- 【C#】对异步请求处理程序IHttpAsyncHandler的理解和分享一个易用性封装 【手记】走近科学之为什么明明实现了IEnumerable<T>的类型却不能调用LINQ扩展方法 【手记】手机网页弹出层后屏蔽底层的滑动响应 【手记】ASP.NET提示“未能创建类型”处理 【Web】一个非常简单的移动web消息框 【手记】解决EXCEL跑SQL遇“查询无法运行或数据库表无法打开...”
- ASP调用域用户验证
- ASP.NET中前台调用后台、后台调用前台的变量或方法