title: Accessing Tag Helper output in Javascript
body: <p>beginner question with Razor and tag helpers I'm afraid! 
  Using tag helpers in my razor html, I can e.g. write:</p>
  
  <pre><code>&lt;div&gt;&lt;date-picker id="datepicker" value="@DateTime.Now"&gt;&lt;/date-picker&gt;&lt;/div&gt;
  </code></pre>
  
  <p>This will then generate the output</p>
  
  <pre><code>&lt;input id="datepicker" class="datepicker" aria-atomic="true" aria-live="assertive" aria-expanded="false" role="combobox" name="datepicker" placeholder="Select date"&gt;
  </code></pre>
  
  <p>and so on. What I'd like to do is to append the output to other objects like dialog screens, which accept an html string to append.</p>
  
  <p>e.g.</p>
  
  <pre><code>var customDesign = "&lt;div id="something"&gt;&lt;date-picker id="datepicker" value="@DateTime.Now"&gt;&lt;/date-picker&gt;&lt;/div&gt;";
  $(".myDialogfield").after(customDesign);
  </code></pre>
  
  <p>This doesn't work in Razor - I've tried various things like creating this as a HTML.Raw string first and injecting it as a variable etc - is there a way I can use the output from my tag helper within a script section?</p>
  
  <p>Thanks for any hints!</p>