且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用服务器端代码打印多个网页

更新时间:2023-11-27 21:52:22

您好,



您可以获取HTML使用 WebRequest 的所有32个页面的内容。

这是一个例子:

http://www.csharp-station.com/HowTo/HttpWebFetch.aspx [ ^ ]



请注意,如果您在服务器上调用页面,请求参数与客户端请求中的请求参数不同。因此,您可以将请求设置(浏览器,Cookie)从原始客户端请求复制到您正在从服务器执行的请求,以获取原始客户端请求的页面。





希望这会有所帮助。



***的关注和快乐的编码,

停止
Hi,

You could fetch the HTML content of all the 32 pages by using a WebRequest.
Here is an example doing this:
http://www.csharp-station.com/HowTo/HttpWebFetch.aspx[^]

Please be aware of the fact that if you call a page on the server, the request parameters are not the same as the request parameters from the client-request. So perhaps you could copy the request settings (Browser, Cookies) from the original client-request to the request you are executing from the server to get the page as it would be requested by the original client.


Hope this helps.

Best regard and happy coding,
Stops


Hello Arima,



我认为在这个帖子中提出任何问题都已经很晚了,但我也坚持了类似要求。我的要求与你的要求完全相同。所以,只是想知道,你还记得你最终选择的方法。



它是单页还是你可以想出更好的逻辑。请帮我解决这个问题。



谢谢,

Sushil
Hello Arima,

I think it is really late to ask anything in this thread, but am also stuck with a similar requirement. My requirement is exactly same as yours. So, just wanted to know, do you remember which was the approach you finally picked up.

Was it make it as single page or you could come up with some better logic to do. Please do help me with this issue.

Thank You,
Sushil