HI All,
In my web form I have Hyperlink. i sets the path of the hyperlink by using NevigateUrl method.
Now When I click on the hyperlink, download window should be open, So I can Open or save .pdf document.
Plz Tell me.... How can Do it.
Thanks.
Loading
karthik vPosted Sep 14, 2011, 3:24 PM
To open a pdf document you can use the following code.
if (File.Exists(proposalPath.Replace("pdf", "txt")))
{
FileStream fs = null;
try
{
fs = File.Open(proposalPath, FileMode.Open, FileAccess.ReadWrite, FileShare.None);
}
catch (IOException)
{
}
bool canRead = fs.CanRead;
if (canRead)
{
fs.Close();
Response.Write("