How to open a file from particular folder(Uploads)

gpinfotech
gpinfotech used Ask the Experts™
on
Hi all,

I am uploading Pdf and Doc files, How can i open these file in new window, when i click on Link button with file name from the uploads folder in asp.net

Give me any reply

Regards,

Narendra.S

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
in the < a href ...> you need to have Target="_new" or Target="_blank"

for example:

<a href="/hello.txt" Target="_blank">Click Me</a>

Open in new window

Author

Commented:
Hi, thank you for your reply,
How can i add href for Link button, can you give me example, i will get the file name from database and i will assign file name dynamically, it is not static.

Regards,
Narendra
Use <ASP:Hyperlink> instead of link button and set NavigateUrl

e.g. http://www.w3schools.com/ASPNET/prop_webcontrol_hyperlink_navigateurl.asp
Starting with Angular 5

Learn the essential features and functions of the popular JavaScript framework for building mobile, desktop and web applications.

Author

Commented:
Thanks for your response
If answers work for  you then You can accept the answers and close this question

Author

Commented:
Hi, thank you for your reply

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial