Jump to content

print


jteixeira

Recommended Posts

hi, I'm using visual web developer in c# and I would like to implement a button which will, upon click, print the currentwebpage.I have no idea where to begin, I think I need some sort of client scriptingbut I suppose there's a simple solution for this...

Link to comment
Share on other sites

put this in the head of your page

<script language="javascript">function mailpage(){mail_str = "mailto:?subject=Check out the " + document.title;mail_str += "&body=I thought you might be interested in the " + document.title;mail_str += ". You can view it at, " + location.href;location.href = mail_str;}</script>

Then use the same approach as the print page except replace window.print() with mailpage()

Link to comment
Share on other sites

This link may help. I only read the title (:)) so I can't comment on the contents, but it may help.Emailing the Rendered Output of an ASP.NET Web Control in ASP.NET 2.0http://aspnet.4guysfromrolla.com/articles/122006-1.aspxEDIT: Here's another link:http://www.devhood.com/tutorials/tutorial_...tutorial_id=758

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...