vbscript eval是否有等效的vb.net eval函数

编程入门 行业动态 更新时间:2024-10-07 00:15:49
本文介绍了vbscript eval是否有等效的vb eval函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想执行以字符串形式传递给我的函数的代码,该代码将在运行时传递.这是一个示例代码,可以作为字符串传递给我的函数.

I want to execute the code that is passed as a string to my function, the code will be passed at runtime. This is an example code that may be passed as a string to my function.

p是一个数据集,已声明并具有一些值,此代码在asp页中执行

p is a dataset, which is declared and has some values, this code is executed in a asp page

p.Tables(0).Rows(0)("disp_status") = "Approved by CEO"; p.Tables(0).Rows(0)("status") = "Approved"; Session("fnc") = "generate po"; Session("rec_id") = p.Tables(0).Rows(0)("IndexID"); Session("ord_ref")="PR No."; Server.Execute("../rlm/mne_pr_form_f.asp"); p.Tables(0).Rows(0)("status") = "Order Raised" p.Tables(0).Rows(0)("disp_status") = "Order Raised" p.Tables(0).Rows(0)("lock_record") = "Yes"; Session("fnc") = ""; Session("rec_id") = "";

推荐答案

没有这样的Eval函数,但是根据您要执行的操作,您可以使用Reflection做类似的事情,这是CodeProject的文章其中包含一个可让您执行此操作的库:运行时编译(.NET eval语句)

There's no Eval function as such, but depending on exactly what you want to do, you can do things like this using Reflection and here is a CodeProject article that includes a library to let you do this: Runtime Compilation (A .NET eval statement)

更多推荐

vbscript eval是否有等效的vb.net eval函数

本文发布于:2023-11-03 04:02:24,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1554189.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:函数   eval   vbscript   net   vb

发布评论

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

>www.elefans.com

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