Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

2 print buttons to print user friendly version with asp.net

Status
Not open for further replies.

beautifulmind84

Programmer
Jan 30, 2007
1
SA
this works with html, but not with asp.net, why?

<LINK REL="alternate" MEDIA="print" id="PrintLink" HREF="1.htm">

<script>
function printPage(item)
{document.getElementById('PrintLink').href=item.getAttribute('page');
window.print();}
</script>

<input name="1" type="button" value="Print this page"
page="1.htm" onClick="printPage(this)">

<input name="1" type="button" value="Print this page"
page="1200.htm" onClick="printPage(this)">

<input name="1" type="button" value="Print this page"
page="1200000.htm" onClick="printPage(this)">
 
This is just a guess, but you might need to let IIS know that your script is javascript, not vbscript:

<script type="text/javascript">

HTH,
Larry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top