title: Using window.print by passing some content as string
body: <p>Can someone help me out with this one.
  I have an MVC page where I have  a print button. When clicking on print I need to open a print popup dialog (the same one that we get when we hit Ctrl+P). But when clicking on print, I have a logic to get some content as string from code behind and pass it to the print window.</p>
  
  <p>I tried to open a popup when clicking on print button and doing Print functionality by using window.print but this works only if we have the content to print along with the button.</p>
  
  <p>Edit:</p>
  
  <p><img src="https://i.stack.imgur.com/2jZF9.png" alt="enter image description here"></p>
  
  <p>If you see the above picture, I have a button with some label "Hi click below button to print content". When I click on print button, I need to have some other content not in this page to be sent to the printer.</p>