VB 用什么代替了“Set"函数?和? [英] What did VB replace the function "Set" with?

查看:12
本文介绍了VB 用什么代替了“Set"函数?和?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现了几个包含使用设置"功能的表单的 aspx 代码.当我在托管服务器上试用它们时,我收到一条错误消息不再支持设置".有谁知道是什么取代了Set"命令?

I've found several aspx codes for forms which include the use of a "Set" function. When I try them out on the hosting server, I get an error message that "Set is no longer supported". Anyone know what replaced the "Set" command?

更具体地说,我该如何更改:

More specifically, how do I change this:

Dim mail 
Set mail = Server.CreateObject("CDONTS.NewMail") 
mail.To = EmailTo 
mail.From = EmailFrom 
mail.Subject = Subject 
mail.Body = Body 
mail.Send

要与 VB.NET 兼容?

to be VB.NET compatible?

推荐答案

如果你的意思是VB6语法

If you mean the VB6 syntax

Set obj = new Object

然后您可以简单地删除 Set

then you can simply remove the Set

obj = new Object()

这篇关于VB 用什么代替了“Set"函数?和?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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