分享

aspx 调用wsc 脚本

 昵称597197 2011-05-03
aspx demo       
 object oScript = System.Runtime.InteropServices.Marshal.BindToMoniker("script:D:\\comMD5.wsc");
        Type tScript = oScript.GetType();
        //object[] param = new object[2];
        //param[0] = "  {mytimes:new Date(),type:'test'};";
        //param[1] = "type";
        object[] param = new object[2];
        param[0] = "你好啊";
        param[1] = "很好的";        
        object str = tScript.InvokeMember("WriteJsCode", System.Reflection.BindingFlags.Default | System.Reflection.BindingFlags.InvokeMethod, null, oScript, param);
        Response.Write(str);
 
 
asp demo
 
' Create an instance of simple.wsc from the file system
      ' You could register the component rather than doing this
      set simple=getobject("script:D:\product.353.us\simple.wsc")
      ' set the message property
      'simple.message =  "Hello World"
      ' Call the display method
      'simple.display

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多