title: How to trigger a Jenkins job in Asp.net with C#
body: <p>i can trigger a jenkins job in asp.net with the following code:</p>
  
  <pre><code>protected void submitBtn_Click(object sender, EventArgs e)
       {
  
            string url = "http://localhost:8080/view/BUILD/job/TESTBUILD/buildWithParameters?token=token123&amp;user=testuser&amp;pass=test&amp;cause=Testmessage";
            HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(url);
            webRequest.Method = "POST";
            HttpWebResponse resp = (HttpWebResponse)webRequest.GetResponse();
            Response.Redirect(http://localhost:8080, "_blank", "fullscreen=1,menubar=yes,toolbar=yes,scrollbars=yes,status=yes,titlebar=yes");
  
       }
  </code></pre>
  
  <p>The problem is, that Jenkins does not display the cause after the "Started by remotehost XX:XXXX:XX" message. It has to display it like this: "Started by remotehost XX:XXXX:XX with note: Testmessage"</p>
  
  <p>The cause message is displayed, when i trigger the job with the "curl -X POST" method on a commandline tool.</p>
  
  <p>I think, that something is wrong with my c# code. Can someone check my above code :)</p>