Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • October 24, 2016, 07:31:00 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Call a webpage with a command line c# program  (Read 3040 times)


  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 245
    • View Profile
    • Mediaguy
    • Donate to Member
Call a webpage with a command line c# program
« on: March 25, 2009, 10:23:09 AM »
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.
Learning C# - Graham Robinson


  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,224
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Call a webpage with a command line c# program
« Reply #1 on: March 25, 2009, 01:23:08 PM »
If you just want to launch the default browser use ShellExecture() API


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
« Last Edit: March 25, 2009, 01:24:43 PM by MilesAhead »