I have the following code in an MVC project inside a cshtml:
var w = window.open('', "print", "height=400,width=600");
w.document.write(json.html);
w.document.close();
w.setTimeout(w.print, 1000);
It does everything I need, opens a print tab, and prints whatever is inside the "json.html" ..
I need to do the same thing, but in VB.Net, and I'm having a hard time opening the print tab, all I've achieved so far is to open a blank tab like this:
Page.RegisterClientScriptBlock("Imprimir", "<script>window.open('', '_blank', 'width=600, height=400');</script>")
My question is: how do I open this print screen? and how do I edit the content that will be written to the print page?
Thank you!