G
Guest
Hi all,
We have a C# WinForm app that has a WebBrowser control on one of its forms,
and we have code in its DocumentComplete event.
The events gets fired in our development machines (with VS 2003 installed),
but is NOT fired on the test machine with only .NET runtime installed. Just
want to see if any of you encountered the same problem before.
Dev environment: VS 2003, Version7.1.3091 +
Test bed: Microsoft .Net Framework 1.1, Version 1.1.4322
Code:
private void axWebBrowser1_DocumentComplete(object sender,
AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEvent e)
{
Log("Log.txt","complete web doc ["+(string)e.uRL+"]");
try
{
HTMLDocument myDoc = new HTMLDocumentClass();
myDoc = (HTMLDocument) axWebBrowser1.Document;
HTMLInputElement otxtSearchBox = (HTMLInputElement) myDoc.all.item("q", 0);
otxtSearchBox.value = "intel corp";
HTMLInputElement btnSearch = (HTMLInputElement) myDoc.all.item("btnI", 0);
btnSearch.click();
HTMLInputElement otxtPwdBox = (HTMLInputElement) myDoc.all.item("txtPd",0);
otxtPwdBox.value = "11111111";
}
catch(Exception ex)
{
Log("Log.txt",ex.Message);
}
}
We have a C# WinForm app that has a WebBrowser control on one of its forms,
and we have code in its DocumentComplete event.
The events gets fired in our development machines (with VS 2003 installed),
but is NOT fired on the test machine with only .NET runtime installed. Just
want to see if any of you encountered the same problem before.
Dev environment: VS 2003, Version7.1.3091 +
Test bed: Microsoft .Net Framework 1.1, Version 1.1.4322
Code:
private void axWebBrowser1_DocumentComplete(object sender,
AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEvent e)
{
Log("Log.txt","complete web doc ["+(string)e.uRL+"]");
try
{
HTMLDocument myDoc = new HTMLDocumentClass();
myDoc = (HTMLDocument) axWebBrowser1.Document;
HTMLInputElement otxtSearchBox = (HTMLInputElement) myDoc.all.item("q", 0);
otxtSearchBox.value = "intel corp";
HTMLInputElement btnSearch = (HTMLInputElement) myDoc.all.item("btnI", 0);
btnSearch.click();
HTMLInputElement otxtPwdBox = (HTMLInputElement) myDoc.all.item("txtPd",0);
otxtPwdBox.value = "11111111";
}
catch(Exception ex)
{
Log("Log.txt",ex.Message);
}
}