如何创建一个文件的副本x:驱动器从文本框中的路径,并将复制的文件粘贴到y:enterd文本框路径

问题描述:

将这个问题的答案发送给我

我有一个文本框-如果我在该文本框中输入了某个路径,则该路径应标识并复制它,

当我在另一个文本框中输入另一个路径时,应在该路径中复制该文件. ?

我需要在asp.net和c#.net中都使用

send me any one answer for this question

i have one text box -if i enter some path in that text box then that path should identify and copy it,

when i enter another path in another text box then in that path it should copy that file. ?

i need in asp.net and c#.net both

我认为您需要返回并了解什么是asp.net和C#首先. Asp.net不是一种语言,而是一种框架.您使用C#作为代码隐藏编程语言编写Asp.net应用程序.您的要求毫无意义,因为应用程序的客户端无法写入用户的硬盘.要在C#中复制文件,只需在System.IO名称空间上进行读取,特别是在其中的File功能.
I think you need to go back and understand what asp.net and C# are first. Asp.net is not a language, but rather a framework. You write Asp.net applications using C# as the code-behind programming language. What you are asking for makes no sense because the client side of an application cannot write to the user''s hard drive. To copy a file in C# just read up on the System.IO namespace, specifically the File functionality in there.


这不是那么简单:asp之间有很大的区别. net和c#.net.

问题在于,对于任何基于Web的程序,任何路径都是相对于服务器而不是客户端的:出于安全原因,您不能访问客户端文件,因此用户键入的文本框必须引用服务器文件,而不是客户端文件.我不愿意让我的用户在我服务器文件的20英尺之内,而且他们有太多机会破坏整个系统.

那你想达到什么目的呢?因为我不认为这是您要走的路...
It''s not that simple: there is a big difference between asp.net and c#.net.

The problem is that with any web based program, any path is relative to the server, not the client: you cannot access client files for security reasons, so your textbox that the user types into has to refer to server files, not client files. I would be reluctant to let my users within twenty feet of my server files, and there is too much chance of them messing up the whole system.

So what are you trying to achieve? Because I don''t think this is the route you want to take...