Friday, January 13, 2012

running Javascript from an external site in C# application


I'm think about building a Silverlight C# Windows phone application for buses in Israel, and I have a basic question(or is it?).



The bus site which I want to get the data from uses Javascript. You need to type in the city you want to get to, and it returns the list of stations in that city.



I'd like to somehow "get" this page, type the code in, and get the results - all in C#. I'm pretty much lost on where to start from. How do I "get" the site code? how do I run the Javascript action that returns the stations, from within C#? is that even possible?

1 comment:

  1. You can either use Fiddler to see where page get its stations from and read stations directly or you can load page to web browser control and invoke Javascript action that returns the stations if such script exists in page.

    ReplyDelete