如何传递从ASP网站对变量的桌面应用程序? [英] How can I pass a variable from a ASP website to a desktop application?

查看:71
本文介绍了如何传递从ASP网站对变量的桌面应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从ASP项目(C#编写的)到桌面C#应用程序传递变量。我知道使用JavaScript你可以使用<一个href=\"http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CGUQFjAA&url=http%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fsystem.web.script.serialization.javascriptserializer.aspx&ei=l-MKUNadA5OwqQHbnonACg&usg=AFQjCNGMTMT3jhFYETV1ayJ_ym7Xqz5gBw&sig2=uFKXU8j4sYCa9NshrCdigg\"相对=nofollow> 的JavaScriptSerializer ,但有对ASP等效?

I am trying to pass a variable from an asp project (written in c#) to a desktop c# application. I know using Javascript you can use a JavaScriptSerializer, but is there an equivalent for asp?

推荐答案

取决于你想发送回应用程序或者什么已经被发送回服务器的内容。即假设一个网页请求的结果是参数你说的(你不是很清楚,HTTP和Web通信的情况下)。 ASP页面可以将数据传回给请求这样的数据的应用程序:

Depends on what you want to send back to the app or what is already being sent back by the server. i.e. let's say the result of a web page request were the "parameters" you speak of (you're not very clear, in the context of http and web communications). An ASP page can pass back the data to an app that requested data like this:

WebClient webClient = new WebClient();
var text = webClient.DownloadString("http://www.example.com/page.aspx");

......记住,这是在应用程序中的code。我认为这是你在问什么;因为真的只有一个办法从ASP应用程序的数据。

... keep in mind, that's the code in the app. I assume that's what you're asking; because there's really only one way to data from an asp application.

如果这不是你实际上在问,请更详细。

If that's not what you're really asking, please be more detailed.

这篇关于如何传递从ASP网站对变量的桌面应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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