title: Getting a process ID by clicking on the window of an app
body: <p>I'm developing a project using MVC 3, and I'm trying to get some process selection functionality going. I already have a select which lists all running processes in a nice drop down format, but I want to take it one step further.</p>
  
  <p>As it stands, a user uses a dropdown menu to select a process from a list of all processes running, and that information gets passed to the view. I'm trying to figure out how to allow the user to click on an icon in the view, then click on a currently open window to pass that window's process ID to the view. </p>
  
  <p>So far all I have is a click event set up for the <code>&lt;img&gt;</code>. I've hit a total roadblock as to what to do next. There's a lot of information on getting a list of all processes, but not a whole lot on getting a specific process via a mouse click. Any thoughts would be helpful. </p>
  
  <p>As far as I can figure, I'll have to wire up a click event in jQuery which fires off a C# action. This action then waits for the user to click a window, grabs that window's process ID, and then sends it back to the view. </p>