如何在aspx页面中包含adovbs.inc文件?

编程入门 行业动态 更新时间:2024-10-21 03:39:21
本文介绍了如何在aspx页面中包含adovbs.inc文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在将ASP经典页面转换为ASP.NET.将扩展名为.inc的文件包含到aspx页面的正确方法是什么?

I'm converting ASP classic page to ASP.NET. What's the proper way of including files with .inc extension to aspx pages?

<!--#include virtual = "adovbs.inc" -->

我注意到,每次将包含指向.inc文件的include指令的页面之一更改为aspx时,我都会从这些.inc文件中得到各种错误.

I've notice that each time that I change one of those pages containing the include directive pointing to .inc files to aspx, I'm getting all sort of errors from those .inc files.

我觉得只是将那些.inc文件中的逻辑重写为vb类.

I feel like just rewriting the logic inside those .inc files into vb classes.

推荐答案

adovbs.inc或adovbs.asp的目的是提供ADODB DLL 中命名常量值的列表(由于Classic ASP依赖于VBScript中的大多数功能都可以在后期绑定中使用).

The purpose of adovbs.inc or adovbs.asp was to provide a list of named constant values from the ADODB DLL (due to Classic ASP relying on late binding in VBScript for most of it's functionality).

adovbs.asp

'-------------------------------------------------------------------- ' Microsoft ADO ' ' (c) 1996-1998 Microsoft Corporation. All Rights Reserved. ' ' ' ' ADO constants include file for VBScript ' '-------------------------------------------------------------------- '---- CursorTypeEnum Values ---- Const adOpenForwardOnly = 0 Const adOpenKeyset = 1 Const adOpenDynamic = 2 Const adOpenStatic = 3 '---- CursorOptionEnum Values ---- Const adHoldRecords = &H00000100 Const adMovePrevious = &H00000200 Const adAddNew = &H01000400 Const adDelete = &H01000800

直到人们意识到您可以使用 METADATA 数据标签进行导入直接从类型库中获取DLL常量,而不需要adovbs包含文件.

This was until people realised you could use the METADATA data tag to import DLL constants direct from the Type Library instead of needing the adovbs include file.

<!-- METADATA TYPE="typelib" UUID="00000200-0000-0010-8000-00AA006D2EA4" -->

在ASP.Net中,所有内容均已编译,因此不需要这些常量文件,因为它们已经以某种形式存在于ADO.Net中.

In ASP.Net everything is compiled so there is no need for these constant files as they will already exist in some form in ADO.Net.

更多推荐

如何在aspx页面中包含adovbs.inc文件?

本文发布于:2023-11-10 16:06:52,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1575833.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:页面   文件   如何在   aspx   adovbs

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!