473,387 Members | 1,532 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

HTML Events in C#

4
Hello,

My application uses the Web Browser ActiveX control in C# 1.1 WinForms.

I use the following code to access the DOM:

mshtml.HTMLDocument htmlDocument;
mshtml.IHTMLElement htmlElement;
mshtml.IHTMLInputButtonElement htmlInputButtonElement;

if (this.wbAdministrator.Document != null)
{
htmlDocument = (mshtml.HTMLDocument) this.wbAdministrator.Document;
htmlElement = htmlDocument.getElementById("btnQuoteSubmit");
if (htmlElement != null)
{
if (htmlElement is mshtml.IHTMLInputButtonElement)
{
htmlInputButtonElement = (mshtml.IHTMLInputButtonElement) htmlElement;

System.Windows.Forms.MessageBox.Show(htmlInputButt onElement.name);
}
}
}

I want to be able to trap the ONCLICK event of this button and various events of other elements. The htmlInputButtonElement object does not expose event delegates. How do I achieve that?

Thanks,

usman
Jun 27 '06 #1
1 3598
hello brother Usman
put ur DOM code in a javascript function and call it wherever u like
best wishes
Hesham el ebrashy
Jul 8 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Pretty woman | last post by:
Hi, I am new to web technologies, including HTML, SVG and javascript. I followed the courses for these languages on www.w3schools.com. I have a question about events raised by a SVG document....
5
by: Richard Cornford | last post by:
I am interested in hearing opinions on the semantic meaning of FORM (elements) in HTML. I have to start of apologising because this question arose in a context that is not applicable to the...
6
by: Wendi | last post by:
If i have an iframe from within an HMTL document: Iframe.htm: ------------------------------ <html> <head> <title>Iframe.htm</title> </head> <body> <iframe src="sample.htm"></iframe>
5
by: c.anandkumar | last post by:
Hi All - I am trying to do the following, 1. Get a piece of HTML from a db 2. Display it on my page with a requirement - clicking on any links in that HTML should not take me away from the...
4
by: JJ | last post by:
Hi, I was wondering is it possible to create my own html table that has two features. 1. it is databound and 2. create my own events for it? The datagrid is nice and I do use it but I need to...
6
by: Dominique | last post by:
Hi all, I'm using .NET v1.1 and the scenario I have is as follows... I have IE as an ActiveX control embedded in may C# App. I generate a HTML file dynamically and within the HTML file I embed a...
4
by: peter.staab | last post by:
I have been trying to do the following. Using JS I want to create an input element (text box) and attach a event listener. I have done in in two different ways. The first is using xml elements...
51
by: Paul Gorodyansky | last post by:
Hi, Ran into the following problem while trying to have a code to attach a Virtual Keyboard to any user's form: User clicks a button and my JavaScript changes outerHTML of say <textarea -...
2
by: Kajsa Anka | last post by:
Before I re-invent something I would like to ask if there exists some code that can be used for create the HTML code for a calendar which I then can include on a web page. The module in the...
2
by: Safalra | last post by:
Recently I've rewritten much of my old Javascript code to use DOM functions so that enhancements can be attached to documents without needing to alter the HTML code. I assumed that adding event...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.