C
cindy
I cannot see how to use progressbar when I programmatically add file to
Windows SharePoint Services document library
Code that adds file
SPWeb site;
FileInfo TheFile = new FileInfo(StrFullFileName);
FileStream fStream = File.OpenRead(StrFullFileName);
byte[] contents = new byte[fStream.Length];
fStream.Read(contents, 0, (int)fStream.Length);
fStream.Close();
finalurl = desturl + StrFileName;
site = new SPSite(finalurl).OpenWeb();
SPFile myfile = site.Files.Add(finalurl,contents);
the file is large and i want progress bar for user to see how much progress
to end. Is there a progressbar web control? How do I tell control to start
and end with site.Files.Add(finalurl,contents) progress? The reason I am
doing this is I can't figure out how to prevent any user interactions with
the form until the file uploads (like close it) so I at least want to show
progress of adding file. Then form closes after file add is done.
Windows SharePoint Services document library
Code that adds file
SPWeb site;
FileInfo TheFile = new FileInfo(StrFullFileName);
FileStream fStream = File.OpenRead(StrFullFileName);
byte[] contents = new byte[fStream.Length];
fStream.Read(contents, 0, (int)fStream.Length);
fStream.Close();
finalurl = desturl + StrFileName;
site = new SPSite(finalurl).OpenWeb();
SPFile myfile = site.Files.Add(finalurl,contents);
the file is large and i want progress bar for user to see how much progress
to end. Is there a progressbar web control? How do I tell control to start
and end with site.Files.Add(finalurl,contents) progress? The reason I am
doing this is I can't figure out how to prevent any user interactions with
the form until the file uploads (like close it) so I at least want to show
progress of adding file. Then form closes after file add is done.