简体   繁体   English

在Windows应用程序中从C#调用javascript __dopostback函数

[英]Calling javascript __dopostback function, from C# in windows application

I want to call "__dopostback" function, in my c# program, in my program I want to read a web page content. 我想在我的C#程序中调用“ __dopostback”函数,在我的程序中,我想读取网页内容。 But in the main web page, the links that I want to read their content are called by __dopostback, function in javascript, for example the function that page call when I click on the button is: 但是在主页中,我想读取其内容的链接由__dopostback调用,它是javascript中的函数,例如,当我单击按钮时页面调用的函数是:

javascript:__doPostBack(ctl00$MainContent$GridView1,Page$2)

Now, how I can call this function from my c# program, note that my program is a windows application not an asp.net application! 现在,我如何从c#程序中调用此函数,请注意,我的程序是Windows应用程序,而不是asp.net应用程序!

I don't see any way to do this, may be you can use Web Request. 我看不到有任何方法可以这样做,可能是您可以使用Web Request。

http://dotnet-codeguru.blogspot.com/2010/02/send-http-web-request-using-c.html http://dotnet-codeguru.blogspot.com/2010/02/send-http-web-request-using-c.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM