I do not understand the return type… I am a VB developer. is it returning some array???
[System.Web.Services.WebMethod]
[System.Web.Script.Services.ScriptMethod]
public static object GetUploadStatus()
{
//Get the length of the file on disk and divide that by the length of the stream
UploadDetail info = (UploadDetail)HttpContext.Current.Session["UploadDetail"];
if (info != null && info.IsReady)
{
int soFar = info.UploadedLength;
int total = info.ContentLength;
int percentComplete = (int)Math.Ceiling((double)soFar / (double)total * 100);
string message = "Uploading...";
string fileName = string.Format("{0}", info.FileName);
string downloadBytes = string.Format("{0} of {1} Bytes", soFar, total);
return new {
percentComplete = percentComplete,
message = message,
fileName = fileName,
downloadBytes = downloadBytes};
}
//Not ready yet
return null;
}
thank you
It is returning an anonymous type (VB.NET reference). It is a type that has no corresponding class.