VB用什么代替了函数“Set"?和? [英] What did VB replace the function "Set" with?
本文介绍了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屋!
查看全文