但在IE8中工作而不保存文件

但在IE8中工作而不保存文件

本文介绍了读取上传的文件在IE11中不起作用,但在IE8中工作而不保存文件。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我正在使用Fileupload 控制并使用OLEDB(Microsoft.JET.Oldeb.4.0)读取上传的文件。在阅读文件之前,我没有保存上传的文件。它在Internet Explorer 8中正常工作,但在Internet Explorer 11中无法正常工作。

I am using Fileupload control and reading the uploaded file using OLEDB ( Microsoft.JET.Oldeb.4.0). before reading the file I am not saving the uploaded file. It is working properly in Internet Explorer 8 but not working in Internet Explorer 11.

请查看我正在使用的以下代码。

Please look into the below code I am using.




Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim Dt As New DataTable
        Dim fi As New FileInfo(FileUpload1.FileName)
        Dt = ImportExcel(fi.Name, "D:\")
    End Sub

    Public Shared Function ImportExcel(ByVal filename As String, ByVal filepath As String) As DataTable
        Dim sConnectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
         "Data Source=" & filepath & ";" & _
         "Extended Properties=text"
        Dim objConn As New OleDbConnection(sConnectionString)
        Dim ExcelDataTable As New DataTable

        objConn.Open()
        Try
            Dim objCmdSelect As New OleDbCommand("SELECT * FROM " & filename, objConn)
            Dim objAdapter1 As New OleDbDataAdapter
            Dim testAdapter As New Odbc.OdbcDataAdapter
            objAdapter1.SelectCommand = objCmdSelect
            Dim objDataSet1 As New DataSet
            objAdapter1.Fill(objDataSet1, "")
            ExcelDataTable = objDataSet1.Tables("")
            Return ExcelDataTable
        Catch ex As Exception
            Throw ex
        Finally
            objConn.Close()
        End Try
    End Function

任何人都可以帮助我解决上述问题?

Can anyone help me out on the above issue?

先谢谢。

推荐答案

只检索数据集 

Only the retrieving of a dataset 


这篇关于读取上传的文件在IE11中不起作用,但在IE8中工作而不保存文件。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 12:40