title: Sitecore 8 - How to - Custom Pop up via code + ClientPage is null
body: <p>I am trying to show a popup message on the content editor on click of publish . I have my handler called in the "publish:begin"event.</p>
  
  <pre><code>    public void PublishCatcherDialog(object sender, EventArgs args)
      {
          //Some custom code here including "id" declaration
          ClientPipelineArgs args = new ClientPipelineArgs();
          args.Parameters.Add("id", id);
          Sitecore.Context.ClientPage.Start(this, "DialogProcessor", args);
      }
  </code></pre>
  
  <p>However I see that in Sitecore 8 , Sitecore.Context.ClientPage.Start gives a null exception error , so does "SheerResponse".
  Most blogs out there have the code for a button click trigger that gives the appropriate command context and Sitecore.Context . How to do in in this scenario (code triggered)?</p>
  
  <p>If you suggest Speak , where would I declare the .js association to this pipeline? I see the sitecore dlls still use this above code to show modal dialogs , so it cannot be completely obselete...
  I feel am missing a simple inheritance somewhere that would set the context .</p>
  
  <hr>
  
  <p>I need to trigger the alert when I click on the "Publish" button on the publish wizard dialog. It looks like a "submit" action on publishform.aspx</p>
  
  <p><a href="http://i.stack.imgur.com/kMwPW.png" rel="nofollow">Image here</a></p>