Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

Display uploaded documents

$
0
0

i have fileupload , attach and gridview.. in database the query simple is

@id int
as
select id,name from downloads

There is other several documents already save in this table

so when user choose file click on attach then file will be display in gridview . .file is displayed in gridview but i want to display on those which is currently uploaded e.g. if user select file click on attach then file display in gridview again select file click on attach file save in gridview means there is 2 files which user uploaded and also these 2 files will be display in gridview .. not all files

how i do this

i try this but in this when i upload file click on attach then file is dispaly in gridview then again when i select file . click on attach then file replace by previous file which i uploaded .. and here i want both 2 files

how i do this

PublicSub uploadmultiple_file(filename AsString)Dim DocID AsStringIf fileupload1.FileContent.Length >2*1024*1024Then
        Response.Write("File size should be less than 2 MB")ExitSubEndIfDim filepath AsString= fileupload1.PostedFile.FileNameDim index AsInteger= filepath.LastIndexOf(".")Dim file_ext AsString= filepath.Substring(index +1)Dim extension AsString=""Dim name AsString=""Dim a, b, c AsIntegerDim DocIDArray AsString=""
    a = fileupload1.PostedFile.FileName.LastIndexOf(".")
    b = Len(fileupload1.PostedFile.FileName)
    c = b - a
    extension = fileupload1.PostedFile.FileName.Substring(a, c)

    name = fileupload1.PostedFile.FileNameDim Document AsByte()=NewByte(fileupload1.PostedFile.ContentLength -1){}
    Document = fileupload1.FileBytesDim KeyName_e()AsString={"Name","DocType","Document","Extension"}Dim Val_l()AsObject={name,7, Document, extension}
    Db_ = Setobj.ExecSP("tbl","Upload_file", Name_e, Val_l)Dim arr AsString=""
    DocID = Db_.Result_dst.Tables(0).Rows(0).Item("DocumentId")
    arr = DocIDDim Name2()AsString={"DocumentID"}Dim val3()AsObject={DocID}
    Db_= Setobj.FillGrid(GridView1,"tbl","display", Name2, Val3)EndSub

Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>