dpak
dpak

Reputation: 55

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

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

Upvotes: 1

Views: 219

Answers (1)

Craig
Craig

Reputation: 7076

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.

Upvotes: 1

Related Questions