'This opens the download dialoge box and allows the user'
'to download the excel sheet from the server'
Response.Clear()
Response.ContentType = "application/octet-stream"
Response.AddHeader("Content-Disposition", "attachment; filename=" & FileName)
Response.Flush()
'This command actually transfers the file'
Response.WriteFile(FileAndPath)
'to download the excel sheet from the server'
Response.Clear()
Response.ContentType = "application/octet-stream"
Response.AddHeader("Content-Disposition", "attachment; filename=" & FileName)
Response.Flush()
'This command actually transfers the file'
Response.WriteFile(FileAndPath)
不知写的什么咚咚,WebForm方面我不懂,我可能现在也用不上呀,类似于瑞星下载方式,
[Visual Basic, C#, C++] The following example uploads the specified file to the specified URI using UploadFile. Any response returned by the server is displayed on the console.[Visual Basic]
Console.Write(ControlChars.Cr + "Please enter the URI to post data to : ")
Dim uriString As String = Console.ReadLine()' Create a new WebClient instance.
Dim myWebClient As New WebClient()Console.WriteLine(ControlChars.Cr + "Please enter the fully qualified path of the file to be uploaded to the URI")
Dim fileName As String = Console.ReadLine()
Console.WriteLine("Uploading {0} to {1} ...", fileName, uriString)' Upload the file to the URI.
' The 'UploadFile(uriString,fileName)' method implicitly uses HTTP POST method.
Dim responseArray As Byte() = myWebClient.UploadFile(uriString, fileName)' Decode and display the response.
Console.WriteLine(ControlChars.Cr + "Response Received.The contents of the file uploaded are: " + ControlChars.Cr + "{0}", Encoding.ASCII.GetString(responseArray))[C#]
Console.Write("\nPlease enter the URI to post data to : ");
String uriString = Console.ReadLine();// Create a new WebClient instance.
WebClient myWebClient = new WebClient();Console.WriteLine("\nPlease enter the fully qualified path of the file to be uploaded to the URI");
string fileName = Console.ReadLine();
Console.WriteLine("Uploading {0} to {1} ...",fileName,uriString);
// Upload the file to the URI.
// The 'UploadFile(uriString,fileName)' method implicitly uses HTTP POST method.
byte[] responseArray = myWebClient.UploadFile(uriString,fileName);// Decode and display the response.
Console.WriteLine("\nResponse Received.The contents of the file uploaded are: \n{0}",Encoding.ASCII.GetString(responseArray));[C++]
Console::Write(S"\nPlease enter the URI to post data to : ");
String* uriString = Console::ReadLine();// Create a new WebClient instance.
WebClient* myWebClient = new WebClient();Console::WriteLine(S"\nPlease enter the fully qualified path of the file to be uploaded to the URI");
String* fileName = Console::ReadLine();
Console::WriteLine(S"Uploading {0} to {1} ...", fileName, uriString);
// Upload the file to the URI.
// The 'UploadFile(uriString, fileName)' method implicitly uses HTTP POST method.
Byte responseArray[] = myWebClient->UploadFile(uriString, fileName);// Decode and display the response.
Console::WriteLine(S"\nResponse Received::The contents of the file uploaded are: \n {0}", Encoding::ASCII->GetString(responseArray));[Visual Basic, C#, C++]
上有例子
你弄错了把
我这里不需要上传
具体为:
1.用.net提供的WebClient等类实现对服务端的访问
2.用客户端和服务端的两个Xml文件分别记录两端相同文件的版本等信息
3.利用反射得到组件版本等信息,比较C/S两端的组件版本,需要的话,则
将服务端对应的版本动态下载到本地,覆盖旧文件。
msn:[email protected]
也不知用那种方式最好?,很多的概念,我晕菜,
关键经理让我年前做完,5551。客户下载服务器端最新文件
2。保存到客户端本地目录
3。检测完整性
4。自动补丁升级
5。覆盖原有旧文件
6。检测服务器Sql数据库表,与本地端mdb数据库表内容比较,有差异,客户端升级(怎么传数据库数据到客户端升级)