Shut Down PC or Laptop WinForm Diagnostics Button Click Using in Asp.Net C#

Shut Down PC or Laptop 

Click Button Shut Down Your Working  PC or Laptop in WinForm Diagnostics in Asp.Net C#.


                           
                        Download Coding
              
                                         Download


                          C# CODING


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Diagnostics;


public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }  
    protected void Button1_Click(object sender, EventArgs e)
    {
      
   ProcessStartInfo shutdown = new ProcessStartInfo("shutdown.exe", "-s");

        Process.Start(shutdown);

    }

}


First -  Add New Form - Select Button - From 

ToolBox 





Next - Add Namespaces - using System.Diagnostics; & shutdown.Exe





Next - Run[F5] - Click Button - Shutdown



0 comments:

Post a Comment