Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 09, 2013 09:29 PM by anantDD2007
Jan 03, 2013 06:48 PM|LINK
I've documents (word, pdf) stored in asp.net website root directory, and the path of those documents are stored in db.
I'm showing the links of the document as hyperlink in datagrid, now when a user clicks on the link the document must be printed in the client system.
Can any one suggest me how to achieve this?
Jan 03, 2013 07:15 PM|LINK
var fileObject = window.open(FilePath); fileObject.print();
Please mark this as answer if helps.
Jan 04, 2013 05:15 PM|LINK
Thanks for your reply.
I sent the FilePath as "Documents/filename.pdf", but it does not do anything.
How shuould i sent the file path format?
As it is @ client side.
Thanks & regards,
Jan 04, 2013 07:45 PM|LINK
Providing file path as "Documents/filename.pdf"
would not be give you the exact file path. You have to provide the relative path.
Try providing like "~/Documents/filename.pdf".
I hope this would work.
Please mark this as answer if it helps.
Jan 04, 2013 08:23 PM|LINK
I even tried that, but nothing happens.
Jan 09, 2013 09:29 PM|LINK
Try using Server.MapPath method. Make sure you are providing correct path.
This method maps the relative/absolute path to the physical path.