vb.net 怎么响应网页下的按钮事件,以便加入能否执行的判断

vb.net 如何响应网页上的按钮事件,以便加入能否执行的判断?
语言:vb.net2008
显示网页控件:Webbrowser控件。

网页上有保存按钮,其源代码为:
HTML code
<INPUT type="button" name="cmdInsert" id="cmdInsert" class="TabButton" value="#R保存" onclick="doSave();">


网页中的JS代码:dosave函数如下:
JScript code
function dosave(){
var qzrq=document.all.QZRQ.value;
var CZFWBM =document.all.CZFWBM.value;
if (isupdated){
   doupdate();
   }
else{
   doInsert();
}


我想在按保存按钮后先运行VB中的一个自定义检测函数Text1(),符合条件则继续执行网页中的doSave,否则提示“无法保存"退出过程,请高手指点,真城期待你的解答!

------解决方案--------------------
拦截event估计够呛,但是可以在javascript中调用C#的函数。这样的话,修改下javascript代码就可以达到要求。
参考:
Two way interaction with JavaScript in Winforms using Webbrowser
http://beensoft.blogspot.com.au/2010/03/two-way-interaction-with-javascript-in.html
------解决方案--------------------
我这里能打开:

Two way interaction with JavaScript in Winforms using Webbrowser
In a recent project I had to integrate Google maps into a Winforms application. To use Google Maps from a desktop client you must be able to call the Javascript in webpage, which can be done with the Webbrowser component. 

Calling JavaScript from C# 
Calling JavaScript in a Webbrowser component is very easy. JavaScript is exposed through the IHTMLWindow2 interface which can be referenced from the IHTMLDocument2 interface through the parentWindow property.

doc = webBrowser1.Document.
DomDocument as IHTMLDocument2;
doc.parentWindow.execScript("createMapMarker
("52.3738007, 4.8909347", 1);", "JavaScript");

Calling C# from JavaScript
Calling C# code from JavaScript can be done using the ObjectForScripting property of the Webbrowser component. The object can be called in JavaScript using window.external. The communication is established through COM interop so the class should be visible for COM.
//Class example
[ComVisible(true)]
public class ExternalApplication
{
public string GetApplicationName()
{
return "The application";
}
}
//Connect it to the webbrowser
webbrowser1.ObjectForScripting 
= new ExternalApplication();

From JavaScript call the external application, our C# app, like this:

(Google maps click event example)
function createMapMarker(lat, lng, html) {
var point = new GLatLng(parseFloat(lat),parseFloat(lng));
var marker = new GMarker(point);
GEvent.addListener(marker, "click", function() {
var appname = window.external.GetApplicationName();
alert(appname);
});
map.addOverlay(marker);
return marker;
}