工程名:say,类名:hello,以下是程序
Public Sub OnStartPage(PassedScriptingContext As ScriptingContext)
Set MyScriptingContext = PassedScriptingContext
Set MyApplication = MyScriptingContext.Application
Set MyRequest = MyScriptingContext.Request
Set MyResponse = MyScriptingContext.Response
Set MyServer = MyScriptingContext.Server
Set MySession = MyScriptingContext.Session
End Sub
Public Sub SayHello()
MyResponse.Write ("Hello World")
End Sub
Public Sub OnEndPage()
Set MyScriptingContext = Nothing
Set MyApplication = Nothing
Set MyRequest = Nothing
Set MyResponse = Nothing
Set MyServer = Nothing
Set MySession = Nothing
End Sub
编译之后我注册了该组件,然后在网页中加入
<html>
<body>
<%
Set conn=Server.CreateObject("say.hello")
conn.SayHello
%>
</body>
</html>
出现错误提示如下:
say 错误 '800a01a8'
需要对象
/TMP33m8mwlrja.asp,行5
还请各位帮帮忙,谢谢! 刚才文章的缺了个逗号,请各位原来啊,SORRY!!!
Public Sub OnStartPage(PassedScriptingContext As ScriptingContext)
Set MyScriptingContext = PassedScriptingContext
Set MyApplication = MyScriptingContext.Application
Set MyRequest = MyScriptingContext.Request
Set MyResponse = MyScriptingContext.Response
Set MyServer = MyScriptingContext.Server
Set MySession = MyScriptingContext.Session
End Sub
Public Sub SayHello()
MyResponse.Write ("Hello World")
End Sub
Public Sub OnEndPage()
Set MyScriptingContext = Nothing
Set MyApplication = Nothing
Set MyRequest = Nothing
Set MyResponse = Nothing
Set MyServer = Nothing
Set MySession = Nothing
End Sub
编译之后我注册了该组件,然后在网页中加入
<html>
<body>
<%
Set conn=Server.CreateObject("say.hello")
conn.SayHello
%>
</body>
</html>
出现错误提示如下:
say 错误 '800a01a8'
需要对象
/TMP33m8mwlrja.asp,行5
还请各位帮帮忙,谢谢! 刚才文章的缺了个逗号,请各位原来啊,SORRY!!!
解决方案 »
- 求VC编写(模拟鼠标,键盘)插件 资料
- 触摸屏,参数计算~~~~
- [请教]关于结构体OPENFILENAME中的lpTemplatename的用法
- 用D版的VC6写MFC程序有没有版权问题隐患?
- CComPtr与_com_ptr_t模板
- 200分求教有关进入ring0的几个问题,谢谢谢谢!!!!!
- 如何无内存泄露地关闭桌面上打开的窗口,如关闭打开的各个网页、各个目录等窗口?
- 如何创建一个启动界面?看过问题在回答!!不是简单的问题呀
- enablemenuitem怎么不能使menuitem变灰呢。我看了很多同样问题的帖子,都没有结果???
- 设置菜单及toolbar上“剪切”按钮使能状态
- 请教高手,如何从网页中将参数传送给ActiveX控件?在线等待!!!
- asp中调用自定义com件出现的问题
Initialize and script ActiveX controls not ed as safe 为 Enalbe or Prompt。
不要在网页编辑器里预览
〉的,而IIS使用线程池来handle客户的,所以效率会非常底,容易造成阻
〉塞。建议用Free Thread做组件。
说法不太准确。在ASP Page scope中使用的COM并不需要使用FTM. 详细清参看:Title: House of COM Q&A, MSJ September, 1998
URL: http://www.microsoft.com/msj/defaultframe.asp?page=/msj/0998/com0998.htm&nav=/msj/0998/newnav.htm- 微软全球技术中心 VC技术支持
本贴子以“现状”提供且没有任何担保,同时也没有授予任何权利。具体事项可参见使用条款
(http://support.microsoft.com/directory/worldwide/zh-cn/community/terms_chs.asp)。
为了为您创建更好的讨论环境,请参加我们的用户满意度调查
(http://support.microsoft.com/directory/worldwide/zh-cn/community/survey.asp?key=(S,49854782))。