I am embeding the WebBrowser in my application to show reports. I
would like to embed the graphics and the CSS files in a resource. To
do this I need to "hook" the WebBrowser control so that when it goes
looking for these files, I can give it the files from the resource.
Any thoughts on how to do this? It does NOT look possible, at the
moment.
Sam
geez...I can only think of one way to really do this well...its a little
hairy, though.
Get the report Manually (via System.Web.HttpRequest). Then parse the
response text with a regex, looking for any <link> elements that hool in css
docs....remove those links and then add in the ones you want.
As for getting the css files out of the local assembly, you can always write
them to the temp directory and ahve the LINK elements use a file://
reference. I don't know if there's a way to get the resource out using the
res:// protocol....might be worth looking into, though
> I am embeding the WebBrowser in my application to show reports. I
> would like to embed the graphics and the CSS files in a resource. To
[quoted text clipped - 4 lines]
>
> Sam
scarleton@gmail.com - 15 Aug 2006 18:24 GMT
> geez...I can only think of one way to really do this well...its a little
> hairy, though.
[quoted text clipped - 6 lines]
> reference. I don't know if there's a way to get the resource out using the
> res:// protocol....might be worth looking into, though
Yea, I am currently doing something like that right now. I was hoping
that there was a way to intercept the WebBrowser control at some low
level so that it would give me a change to provide the external file
rather then it go looking for it. Oh well;)
Sam