using webbrowser to test but can't include post data

I have been instructed to use the WebBrowser control in a WinForm to test parts of a web page. I have been able to determine how to manipulate the page in every way I need to except for one. I do not know how to include an "href" attribute with the post data.

Here's the javascript I'm trying to conquer programmatically:

<FORMname="items"method="post">

<TABLE><TR>

<TD><A href="bigplot.phtml?exo=995&x=7"

onClick="this.href='bigplot.phtml?exo=995&xyz=1477';if (!confirm('Are you sure?')) { return false; }">

I want to circumvent the "confirm" so that the tests can run without a human present. If all the "confirm" does is submit a "post" with the href attribute (in bold above) included as post data then how do I include it before I perform a "submit()" on the HTMLFormElement? Or is there an easier way to do this? Oh, and I can't use the href attribute on the containing element since it uses a slightly different value.

[1419 byte] By [JeffLehmer] at [2008-1-10]
# 1

Just a quick update...all i want to do is be able to handle the "confirm" from the onclick event without actually having to click on the button. I was thinking I could just circumvent the click action by doing a post directly since the confirm will automatically do a http post and include the "this.href=..." attribute. What I can't figure out is how to add the attribute to the HTMLFormElement before I call "submit()" on it. Won't this accomplish the same thing?

JeffLehmer at 2007-10-3 > top of Msdn Tech,Internet Explorer Development,Internet Explorer Web Development...
# 2

Found my own answer! This was easier than I thought. I assumed I had to set the "post data" on the form and do a "submit()". However, there is a special way to call "Navigate(..)" on the WebBrowser itself that does what I need. Find out more here:

http://support.microsoft.com/kb/174923

JeffLehmer at 2007-10-3 > top of Msdn Tech,Internet Explorer Development,Internet Explorer Web Development...