在CF3.5我如何使用的HTMLDocument [英] How do I use HtmlDocument in CF3.5

查看:129
本文介绍了在CF3.5我如何使用的HTMLDocument的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的工作是基于Windows CE运行的设备,我需要自动执行登录过程。我可以使用下面的code一个窗体应用程序来实现这一点,但它似乎并不像我可以使用相同的过程在智能设备上。有没有办法做同样的事情在行政长官的工作,而?

 字符串,屁股= webBrowser1.Url.AbsoluteUri;
        的HTMLDocument DOC = webBrowser1.Document;
        的HtmlElement userValue = doc.GetElementById(用户名);
        userValue.SetAttribute(价值,用户);
        的HtmlElement passValue = doc.GetElementById(密码);
        passValue.SetAttribute(价值,通行证);
        的HtmlElement subButton = doc.GetElementById(提交);
        subButton.InvokeMember(点击);
 

解决方案

的HTMLDocument 类,真正的所有 System.Windows.Forms的.HtmlXxx 不要在Compact Framework中存在的对象。

如果你有一个非常小的一组您要访问的东西,你也许可以推出自己的实现。你也许可以借用一些从单声道code基地以及。否则,真的没有什么好答案。

I'm working on a Device that runs on windows CE and i need to automate a login process. I was able to achieve this in a Forms Application using the code below but it doesn't seem like I can use the same process on the smart device. Is there a way to do the same thing while working in CE?

        string butts = webBrowser1.Url.AbsoluteUri;
        HtmlDocument doc = webBrowser1.Document;
        HtmlElement userValue = doc.GetElementById("username");
        userValue.SetAttribute("value", "user");
        HtmlElement passValue = doc.GetElementById("password");
        passValue.SetAttribute("value", "pass");
        HtmlElement subButton = doc.GetElementById("submit");
        subButton.InvokeMember("click");

解决方案

The HtmlDocument class, and really all of the System.Windows.Forms.HtmlXxx objects do not exist in the Compact Framework.

If you have a very small set of things you want to access, you might be able to roll your own implementation. You might be able to borrow some from the Mono code base as well. Otherwise, there really aren't any good answers.

这篇关于在CF3.5我如何使用的HTMLDocument的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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