Hi ,
we have two webistes.One is for travel agency and other is a common portal. I have to include ticket availability of the travel agency website in to my portal website.
So I am planning to access travel agency site for this(web crawling).I have to pass from station ,two station, date of journey etc from my portal.so for each time, portal website is passing these all parameters to the travel agency site and get the response from this site. Finally we will parse the response from the agency site and filter the data's and planning to show it in portal site.
I don't need to modify source code for the travel agency.so how can I assign parameters to the appropriate control and trigger availability button in the travel agency site from the Portal project?
Any help would be appreciable.
Jean PaulPosted Aug 9, 2012, 10:46 AM
You need to use
1) HTTP Request to get the form
2) Fill the parameters
3) Invoke the button click
4) Parse the result
There is an existing solution using the WebBrowser control in Windows Forms.
If it is a url encoded:
http://msdn.microsoft.com/en-us/library/debx8sh9.aspx
+ posting in ASP.NET
http://www.c-sharpcorner.com/uploadfile/desaijm/asp.netposturl11282005005516am/asp.netposturl.aspx
But ASP.NET arises STA thread problems and requires additional infrastructure to use WebBrowser control. Following article shed some light over it:
http://www.codeproject.com/Articles/50544/Using-the-WebBrowser-Control-in-ASP-NET