A day with .Net

My day to day experince in .net

Invoking javascript method vis webbrowser control

Posted by vivekcek on August 24, 2009

Some times when we are doing screen scrapping,We have to invoke some javascript methods in the page.For example if there is a method named “ChangeOptions” with 3 parameters “cmb_originCity”, “cmb_destCity”, “ArrCity”.Then we can invoke this by

object[] pp = new object[] { "cmb_originCity", "cmb_destCity", "ArrCity" };
                    this.WBrowser.Document.InvokeScript("ChangeOptions", pp);
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s