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?
 
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.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.