开发者

How to download html using WebClient residing on the own server?

开发者 https://www.devze.com 2023-02-07 04:19 出处:网络
How do I make WebClient connect and download htm from its page. I know this is very confusing so let me retierate:

How do I make WebClient connect and download htm from its page. I know this is very confusing so let me retierate:

I have written code using WebClient to download htm string of http://www.someserver.com/Invoice.aspx. The Webclient code resides in the Invoice.aspx page and hence is giving me an error like this "A connection attempt failed because the connected party did not properly respond after a period of time". I am not sure how to get the way around it so that I 开发者_开发技巧can download the htm page from the page itself.

I will be indebted forever


Can you not use a querystring parameter in your WebClient method call? Then you could check for the querystring parameter and if it does not exist then just render the page and ignore the WebClient call.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号