How would I show a PDF/ Doc /Text File, in a PopUP window instead of allowing users to download it ?
These files path is stored in a database table and in my ASP.NET MVC 2.0 Project I have a folder named ” Files” where my actual files are stored .
I have a Telerik MVC Grid where there is a column named AssociatedFiles and in this column there is a ClientTemplate such as ” View File “. Once someone clicks on this Link , actual file associated with that RowID should be displayed in a PopUP instead of allowing users to download it .
Using FilePathResult I can allow my users to download it but I dont want this . I want users to view that perticular File in a PopUp Window .
I searched alot for the associated code for this perticular scenario but couldnt find anything usefull . Please Help me with actual working codes. Send your comments @ ashes22@gmail.com
Add a partial View to your View Folder named ” FilePopUp” . Here use Telerik Window Control
Code :-
In your Controller :-
In your Model Class , create another Class named ” FilePathAdmin” and write following code in it
And thats it .. You are done