开发者

Stream filter to alter paths of images

I am looking to write a stream filer in a http module that anyalyze the output html of a page, search through the pages html for开发者_StackOverflow中文版 any images within the page, check if the source of the image has a full path or relative path. If its a relative path, alter it to have a full path. Anyone ever write anything anything like this? Looking for some examples of such?


I suggest to direct use the WebControlAdapter for the img tag and not go by analyse the full page for many reasons.

Here is an example how you can you this adapter, you can simple change it to just fix the full path: http://www.codeproject.com/KB/web-image/IePngControlAdapter.aspx

Here is one more example more close to what you ask

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜