If you host the BeforeNavigate2
event of the WebBrowser control in a Microsoft Visual Studio .NET
application, the event does not fire.
This fix was designed for computers running Microsoft .NET
Framework Service Pack 1 (SP1). If you installed Microsoft .NET Framework
Service Pack 2 (SP2), you receive the following error message if you try to
install this fix:
Could not install Microsoft .NET
Framework Hotfix (Q327135)
To install the correct hotfix on computers
running Microsoft .NET Framework Service Pack 2, you must install the
Post-Service Pack 2 .NET Framework Core Common Language Runtime Hotfix Package.
This hotfix package includes the fix to the problem that is described in this
article. It also includes other fixes. To obtain this hotfix, please refer to
the following article in the Microsoft Knowledge Base: For additional information, click the following article
number to view the article in the Microsoft Knowledge Base:
INFO: Post-Service Pack 2 .NET Framework Core CLR Hotfix Package
A supported fix is now available from Microsoft, but it is only
intended to correct the problem that is described in this article. Apply it
only to computers that are experiencing this specific problem. This fix may
receive additional testing. Therefore, if you are not severely affected by this
problem, Microsoft recommends that you wait for the next Microsoft .NET
Framework service pack that contains this hotfix.
To resolve this problem
immediately, contact Microsoft Product Support Services to obtain the fix. For
a complete list of Microsoft Product Support Services phone numbers and
information about support costs, visit the following Microsoft Web site:NOTE
: In special cases, charges that are ordinarily incurred for
support calls may be canceled if a Microsoft Support Professional determines
that a specific update will resolve your problem. The typical support costs
will apply to additional support questions and issues that do not qualify for
the specific update in question.
The English version of
this fix has the file attributes (or later) that are listed in the following
table. The dates and times for these files are listed in coordinated universal
time (UTC). When you view the file information, it is converted to local time.
To find the difference between UTC and local time, use the Time Zone
tab in the Date and Time tool in Control Panel.
Date Time Version Size File Name
31-Jul-2002 19:26 1.0.3705.299 1,953,792 Mscorlib.dll
31-Jul-2002 08:50 1.0.3705.299 2,265,088 Mscorsvr.dll
31-Jul-2002 08:51 1.0.3705.299 2,265,088 Mscorwks.dll
has confirmed that this is a problem in the Microsoft products that are listed
at the beginning of this article.
Steps to Reproduce the Behavior
- To create a new Windows Application project in Microsoft
Visual Basic .NET, follow these steps:
- Start Microsoft Visual Studio .NET.
- On the File menu, point to New, and then click Project.
- In the New Project dialog box, click Visual Basic Projects under Project Types, and then click Windows Application under Templates. Click OK to create the project. By default, Form1 is created in
- On the Tools menu, click Customize Toolbox.
- In the Customize Toolbox dialog box, on the COM Components tab, click to select the Microsoft Web Browser check box to add a reference to it. Click OK to add the WebBrowser control to the Windows Forms
- Drag a WebBrowser control (look for "Explorer" in the
toolbox) from the toolbox to Form1 to add the AxWebBrowser1 control to the Form1 class.
- Switch to Code view of Form1.vb, and then add the following
code to the New subroutine (the default constructor) that follows the call to InitializeComponent:
- In the Code window, notice the drop-down list boxes. In the
leftmost list, click AxWebBrowser1. In the rightmost list, click BeforeNavigate2, and then add the following code to the event handler stub that
MessageBox.Show("BeforeNavigate2 event fired")
- On the Debug menu, click Start (or press F5) to run the code.
Notice that the
WebBrowser control opens the Microsoft Network Web site. However, notice that
the BeforeNavigate2 event does not fire before the browser opens the site.
After you install the hotfix that is listed in the "Resolution"
section of this article, the BeforeNavigate2
event fires, and the MessageBox is displayed.
For additional information, click the following article
numbers to view the articles in the Microsoft Knowledge Base:
BUG: The BeforeNavigate2 Event of WebBrowser Control Does Not Fire If Hosted in a Visual C# .NET Application
BUG: The BeforeNavigate2 Event of the WebBrowser Control Does Not Fire If Hosted in a Visual Basic .NET Application
Article ID: 327135 - Last Review: October 12, 2005 - Revision: 1.7
- Microsoft .NET Framework Service Pack 1
- Microsoft Internet Explorer 5.01
- Microsoft Internet Explorer 5.5
|kbhotfixserver kbqfe kbbug kbctrl kbevent kbfix kbnetframe100presp3fix kbqfe KB327135|Retired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.