IE Web Browser control ActiveX control event trapping

Hello,

I am writing an application (in C# using VS 2003) that will disaply OFFLINE HTML content in a Web Browser control.

The diaplayed HTML page will exist on the local hard drive. A portion of the page will pull web content while the rest will be an HTML form like the following:

<FORM ID="formSuggestion">
   How does this text apply to you?
   <BR />
   <INPUT ID="txtApply" TYPE="text" />
   <BR />
   <INPUT ID="btnSubmit" TYPE="submit" VALUE="Submit" />
      OR MAYBE
   <INPUT ID="btnSubmit" TYPE="button" VALUE="Submit" ONCLICK="javascript:SubmitClient();" />
</FORM>

When the user clicks the submit button, instead of any HTML action, I want my application to be able to extract the text from the text box control.

I will be using the Microsoft.mshtml library to gaining access to the underlying DOM is not a problem. However, I am not sure on how to access the relevant elements at the appropriate time when the user clicks Submit.

Any ideas?

Thanks,

Khan.
raheelasadkhanAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RoninTheCommented:
you can hook BeforeNavigate event of browser control. when you click submit the page'll start navigating, and you can process it accordingly in BeforeNavigate event handler.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.