Need to open .pdf file while click on Hyperlink
-
Hai all, i had one hyperlink(click here),while i click on the link i need to open .pdf file which i have in d:/abc.pdf thanks in advance. while i give href...like then the pdf file opens in IE or Firefox. but i need to open .pdf file directly...not in IE or Firefox.
Thanks Subbu.
-
Hai all, i had one hyperlink(click here),while i click on the link i need to open .pdf file which i have in d:/abc.pdf thanks in advance. while i give href...like then the pdf file opens in IE or Firefox. but i need to open .pdf file directly...not in IE or Firefox.
Thanks Subbu.
subbu.sk wrote:
while i give href...like
As a thumb of rule, href always opens content in broswer.
subbu.sk wrote:
but i need to open .pdf file directly...not in IE or Firefox.
Respose.Redirect("filename");
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
-
Hai all, i had one hyperlink(click here),while i click on the link i need to open .pdf file which i have in d:/abc.pdf thanks in advance. while i give href...like then the pdf file opens in IE or Firefox. but i need to open .pdf file directly...not in IE or Firefox.
Thanks Subbu.
-
Did you try to search on google?[^]
I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post.
string filename = System.IO.Path.GetFileName(filepath); Response.Clear(); Response.ContentType = "application/pdf"; Response.AddHeader("Content-Disposition", "attachment; filename=" + filename); Response.Flush(); Response.WriteFile(filepath);
Venky