Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
inet
active_desktop
active_scrptng
asp.components
asp.db
asp.general
comctl32
comp.packaging
components.dev
dbweb
dhtml_editing
docobjects
html_authoring
html_objmodel
iis
iis.ftp
iis.security
iis.smtp_nntp
indexserver
misc
mshtml_hosting
scripting.jscript
scripting.vbscript
sdk_setup
shell_objmodel
urlmonikers
webbrowser_ctl
wininet
  
 
date: 16 Feb 2007 05:32:04 -0800,    group: microsoft.public.inetsdk.programming.webbrowser_ctl        back       


Web Browser control in ASP.NET page.   
I am trying to use a web browser control on an ASP.NET page to print
HTML from a server. I create a new WebBrowser control, add a
DocumentCompleted handler that calls WebBrowser.Print() and then
Navigate to the page I want to print.

If I use the <ASPCOMPAT="true" /> tag, the DocumentCompleted event
occurs but nothing prints.

If I set <ASPCOMPAT="false" /> and run my code in separate STA thread,
the DocumentCompleted event does not fire.

If I do the same thing in a desktop app rom the main thread, it prints
fine, even though I have not added my control to the Controls
collection of the Form I am on.

If I try to do the printing from a separate thread in the desktop app,
it the event does not fire as above.

Can someone explain this? Is there a way to get around it?
date: 16 Feb 2007 05:32:04 -0800   author:   unknown

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us