Other Software > Developer's Corner
Call a webpage with a command line c# program
(1/1)
mediaguycouk:
I'm converting a Form based C# application to an automatic command line based C# version. However I need to call a webpage (like a cron job would), but I don't know how to do it from the command line. In a form I would call play.webBrowser1.Url = new Uri(address); (after calling the play class that has a web browser element).
Anyone help with this? I don't think I need any feedback from the page at all.
MilesAhead:
If you just want to launch the default browser use ShellExecture() API
http://msdn.microsoft.com/en-us/library/bb762153(VS.85).aspx
Use the URL in double quotes as the "filename" and the 'open' verb
Handle, Working dir and all the rest can be NULL or 0
Navigation
[0] Message Index
Go to full version