Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
i am trying to show the doc/pdf/txt/ppt/xls file on asp.net page that was uploaded by admin
i used iframe for this but not working its start downloading
like please someone tell me how to display a document file on asp.net page
 
 <iframe src="<%#Eval("path")%>" scrolling="no"></iframe>
 
can someone tell me an idea to show such kind of file in asp.net using c#
and how to play video ...i am trying like
 
 <iframe src="<%#Eval("videopath")%>" scrolling="no"></iframe>
 
but not working
Posted 15-Feb-13 0:38am
Edited 19-Feb-13 19:58pm
v7
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You can't just show any kind of file in a browser window on the client.
The client's browser setup will define how attachments are opened and you have no control over this.
By default .doc and .docx will open with Word, pdf with reader(either browser add-in or stand-alone), etc...
  Permalink  
Comments
Miss Maheshwari at 18-Feb-13 6:13am
   
but if a member upload his/her resume than s/he can see like we all do in naukri.com
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

use hyperlink and _Target=blank redirect page to Your path on hyperlink click by using navigate url....
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 6,569
1 Sergey Alexandrovich Kryukov 6,168
2 DamithSL 5,228
3 Manas Bhardwaj 4,717
4 Maciej Los 4,150


Advertise | Privacy | Mobile
Web03 | 2.8.1411022.1 | Last Updated 20 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100