I have a problem that I feel is best implimented in a stand alone windows application, but needs to pass data to a web page that is already open.
我有一个问题,我觉得最好在独立的Windows应用程序中得到启发,但需要将数据传递给已经打开的网页。
Is it possible to pass the data directly to the web page?
是否可以将数据直接传递到网页?
If so, what is the best way to go about it?
如果是这样,最好的方法是什么?
(Its my first question, so go easy on me!)
(这是我的第一个问题,所以对我来说很容易!)
2 个解决方案
#1
1
This is not going to be an easy problem to solve, but I think it's possible by hosting the web-page in a browser embedded in a .NET application. This Code-Project article might help
这不是一个容易解决的问题,但我认为可以通过在嵌入.NET应用程序的浏览器中托管网页来实现。此Code-Project文章可能有所帮助
Also this article talks a bit about accessing the DOM through a C# application.
本文还讨论了通过C#应用程序访问DOM的问题。
Have you got any requirements on language? And can you add a bit more detail about exactly what you're trying to achieve?
你对语言有什么要求吗?您是否可以添加一些关于您要实现的目标的详细信息?
EDIT 1: Watij is a web-application testing framework for Java. You can use it to fill in text-boxes, click buttons etc. I think it might fit your needs and, if it doesn't, it's open-source, so you might be able to hack it to work. There is a whole family of Wati* products - Watin for .NET, Watir for Ruby, etc.
编辑1:Watij是Java的Web应用程序测试框架。您可以使用它来填写文本框,单击按钮等。我认为它可能符合您的需求,如果不是,它是开源的,所以您可能能够破解它的工作。有一整套Wati *产品--Watin for .NET,Watir for Ruby等。
#2
1
Getting access to external web pages are not permitted due to security credentials. But you can open and write to a web page via winInet APIs. Please go through the article
由于安全凭证,不允许访问外部网页。但您可以通过winInet API打开并写入网页。请仔细阅读这篇文章
http://www.informit.com/library/content.aspx?b=Visual_C_PlusPlus&seqNum=107
#1
1
This is not going to be an easy problem to solve, but I think it's possible by hosting the web-page in a browser embedded in a .NET application. This Code-Project article might help
这不是一个容易解决的问题,但我认为可以通过在嵌入.NET应用程序的浏览器中托管网页来实现。此Code-Project文章可能有所帮助
Also this article talks a bit about accessing the DOM through a C# application.
本文还讨论了通过C#应用程序访问DOM的问题。
Have you got any requirements on language? And can you add a bit more detail about exactly what you're trying to achieve?
你对语言有什么要求吗?您是否可以添加一些关于您要实现的目标的详细信息?
EDIT 1: Watij is a web-application testing framework for Java. You can use it to fill in text-boxes, click buttons etc. I think it might fit your needs and, if it doesn't, it's open-source, so you might be able to hack it to work. There is a whole family of Wati* products - Watin for .NET, Watir for Ruby, etc.
编辑1:Watij是Java的Web应用程序测试框架。您可以使用它来填写文本框,单击按钮等。我认为它可能符合您的需求,如果不是,它是开源的,所以您可能能够破解它的工作。有一整套Wati *产品--Watin for .NET,Watir for Ruby等。
#2
1
Getting access to external web pages are not permitted due to security credentials. But you can open and write to a web page via winInet APIs. Please go through the article
由于安全凭证,不允许访问外部网页。但您可以通过winInet API打开并写入网页。请仔细阅读这篇文章
http://www.informit.com/library/content.aspx?b=Visual_C_PlusPlus&seqNum=107