avatar image

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

Login with username, password and session length
  • Thursday June 17, 2021, 3:33 pm
  • Proudly celebrating 15+ 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 4250 times)


  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 247
    • View Profile
    • Mediaguy
    • Donate to Member
Call a webpage with a command line c# program
« on: March 25, 2009, 10:23 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,651
    • 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 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 PM by MilesAhead »