I am trying to execute a script written in VBScript
, in a C#
class library project
using System.Web.UI; //reference added at t
I belive
MSScriptControl script = new ScriptControl();
should be
MSScriptControl.ScriptControl sc = new MSScriptControl.ScriptControl();
using Microsoft.VisualBasic;
Use this code:
MSScriptControl.ScriptControl script = new MSScriptControl.ScriptControl();
script.Language = "VBScript";
script.AddObject("Repository", connectToDB.GetRepository);