如何在ASP.NET的新窗口中打开PDF文件列表?

时间:2022-08-04 21:16:22

How do I open a PDF file List in dialog box in a new Window in an ASP.NET application ?

如何在ASP.NET应用程序的新窗口中的对话框中打开PDF文件列表?

I want list of pdf file which is stored in folder in my application and then select any of pdf and save in logged user's particular folder.

我想要在我的应用程序中存储在文件夹中的pdf文件列表,然后选择任何pdf并保存在已登录用户的特定文件夹中。

1 个解决方案

#1


2  

Since you want to display a list of pdf files stored in a folder on the server side you will need to render the list to a page in some format that makes sense. You may open that up as a dialog (perhaps using something like jquery ui) but it wouldn't be necessary.

由于您要显示存储在服务器端文件夹中的pdf文件列表,因此您需要以某种有意义的格式将列表呈现给页面。你可以打开它作为一个对话框(也许使用像jquery ui这样的东西),但它没有必要。

Next to each file you could have a button that indicates the action you are after, say 'Copy'.

在每个文件旁边,您可以有一个按钮,指示您正在执行的操作,请说“复制”。

This would then send the id/name of the relevant file to the server and the server code could copy the file to some other location on the server that you refer to as the users folder.

然后,这会将相关文件的id / name发送到服务器,服务器代码可以将文件复制到服务器上您称为users文件夹的其他位置。

However, if you want to download the file to the user's machine that is something else and you will find many answer here on SO about that.

但是,如果你想将文件下载到用户的机器上,那么你可以在这里找到很多答案。

#1


2  

Since you want to display a list of pdf files stored in a folder on the server side you will need to render the list to a page in some format that makes sense. You may open that up as a dialog (perhaps using something like jquery ui) but it wouldn't be necessary.

由于您要显示存储在服务器端文件夹中的pdf文件列表,因此您需要以某种有意义的格式将列表呈现给页面。你可以打开它作为一个对话框(也许使用像jquery ui这样的东西),但它没有必要。

Next to each file you could have a button that indicates the action you are after, say 'Copy'.

在每个文件旁边,您可以有一个按钮,指示您正在执行的操作,请说“复制”。

This would then send the id/name of the relevant file to the server and the server code could copy the file to some other location on the server that you refer to as the users folder.

然后,这会将相关文件的id / name发送到服务器,服务器代码可以将文件复制到服务器上您称为users文件夹的其他位置。

However, if you want to download the file to the user's machine that is something else and you will find many answer here on SO about that.

但是,如果你想将文件下载到用户的机器上,那么你可以在这里找到很多答案。