Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6545865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:38:16+00:00 2026-05-25T11:38:16+00:00

How would I show a PDF/ Doc /Text File, in a PopUP window instead

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T11:38:17+00:00Added an answer on May 25, 2026 at 11:38 am

    Add a partial View to your View Folder named ” FilePopUp” . Here use Telerik Window Control

    Code :-

     <% Html.Telerik().Window()
                .Name("PopupWindow")
                //.Title("View PDF")
                //.Icon(Url.Content("~/Content/Common/Icons/favicon.png"), "favicon")
                .LoadContentFrom(Model.PDFFilePath).Modal(true)
                .Buttons(buttons => buttons.Close(Url.Action("Controller", "Action")))
                //.Buttons(buttons => buttons.Maximize(Url.Action("Controller")).Close(Url.Action("Controller", "Action")))
                .Scrollable(false)
                .Resizable()
                .Draggable(true)
                .Width(870)
                .Height(500)
                .Render();
        %>
    

    In your Controller :-

                public ActionResult GetPdffile(string id)
        {
            try
            {
                FilePathAdmin filePath = new FilePathAdmin();
                filePath.ERAPDFFilePath = this.WorkerService.GetPdfFilepath(id);
               //string filepath = this.WorkerService.GetPdfFilepath(ID);
                return PartialView("PopUpWindow", filePath);
    
            }
            catch (Exception ex)
            {
                bool reThrow = ExceptionPolicyWrapper.HandleException(ex, ExceptionPolicies.MVCPolicy);
                if (reThrow)
                    throw;
            }
            return null;
        }
    

    In your Model Class , create another Class named ” FilePathAdmin” and write following code in it

               public class FilePathAdmin
    {
        public string ERAPDFFilePath { get; set; }
    }
    

    And thats it .. You are done

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating HTML (popup window), EXCEL and PDF report and would like to show
how to store text files or pdf in sdcard and then show it in
I am writing an application that would download and replace a pdf file only
I would like to show some hidden text in a Flex application and have
I would like to show some links only to authenticated users in an asp.net
I would like to show an XML file in my .NET 2.0 WinForms app
which free PDF viewers are available to directly show a PDF file inside a
i have a program that takes some time creating pdf files i would like
What would be the simplest, shortest way to turn a text file into a
I am using com.lowagie.text.FontFactory in generating a PDF file and am trying to use

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.