使用asp.net的远程共享应用程序 [英] Remote sharing application using asp.net

查看:71
本文介绍了使用asp.net的远程共享应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在构建一个使用ASP进行桌面共享的应用程序.我在.net中使用RDPViewer.
我的问题是我建立了如下所示的Javascript函数:

Hi,

I am building an app for desktop sharing using asp. In which I am using RDPViewer in .net.
My problem is I have build a Javascript function shown below:

function BtnConnect1()
{
    var e1 = document.getElementById('Client');
    var e2 = document.getElementById('Text1');
    e1.Connect(e2.value,"User1","");


}
function BtnDisConnect1()
 {
    var e1 = document.getElementById('Client');
    e1.Disconnect();

}


此代码在正文中:


this code in body:

<object id='Client'  runat="server" lang='javascript' classid="CLSID:32be5ed2-5c86-480f-a914-0ff8885a1b3f" style="width: 1239px; height: 639px"></object> 
 <input id="Text1"  runat="server" type="text" style="width:1052px"/>


在设计时connect()在智能感知中显示,但是在运行时,以下几行给出了错误:
e1.Connect(e2.value,"User1","");

错误:
消息:对象不支持此属性或方法"

我不知道它为什么会出现!请提出建议!! 紧急!


at design-time connect() is showing in intellisense but at runtime the following lines gives error :
e1.Connect(e2.value,"User1","");

error:
"Message: Object doesn''t support this property or method"

I am not getting clue why it is coming!! please suggest something !!its urgent!!!

推荐答案

var e1 = document.getElementById('Client');
            var e2 = document.getElementById('Text1');
            e1.Connect(e2.value,"User1","");


首先,e1只是一个变量,在这里保存一个对象值,该对象值将在运行时定义.因此,我不知道您如何获得与Connect()关联的智能感知.

现在,基于错误,显然您尝试使用的对象没有公开connect()方法.
使用Java脚本调试来查看内部信息,并确认该方法是否公开.
在功能的开头放置一个debugger;,并在IE设置中启用Javascript调试.完成后,它将在调试模式下自动停止在那里,您可以在其中看到e1对象中的内容.可能是null,并且document.getElementById(''Client'');需要更改才能正确获取所需的对象.


Firstly, e1 is just a variable which holds a object value here that will be defined at runtime. So, I have no idea how come you can get intellisense for Connect() associated with it.

Now, based on error, clearly the connect() method is not exposed of the object you are trying to use.
Use Javascript debugging to see the internals and confirm if the method is exposed.
Put a debugger; at the start of function and enable Javascript debugging in your IE settings. Once done, it would automatically stop there in debug mode where you can see whats there in the e1 object. May be it''s null and document.getElementById(''Client''); needs a change to get the required object correctly.


这篇关于使用asp.net的远程共享应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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