Posted 15 Feb 2011 Link to this post
Posted 16 Feb 2011 Link to this post
MyNamespace.FileConfig oConfig = AsyncUpload1.CreateDefaultUploadConfiguration<MyNamespace.FileConfig>();
oConfig.Name=
"Charlie"
;
oConfig.Account=
"blalbalba"
AsyncUpload1.UploadConfiguration = oConfig;
AsyncUpload1.HttpHandlerUrl =
"~/Test/Handler.ashx"
namespace
MyNamespace
{
public
class
FileConfig : AsyncUploadConfiguration
private
string
sName =
.Empty;
Name
get
return
sName ; }
set
{ sName = value; }
}
sAccount=
Account
sAccount; }
{ sAccount= value; }
FileConfigResult : AsyncUploadResult
sFileID;
FileID
sFileID; }
{ sFileID = value; }
Handler : AsyncUploadHandler, System.Web.SessionState.IRequiresSessionState
protected
override
IAsyncUploadResult Process(UploadedFile file, HttpContext context, IAsyncUploadConfiguration configuration,
tempFileName)
// Call the base Process method to save the file to the temporary folder
// base.Process(file, context, configuration, tempFileName);
// Populate the default (base) result into an object of type SampleAsyncUploadResult
AsyncUploadResult result = CreateDefaultUploadResult<MyNamespace.FileConfigResult>(file);
//Name and Account are empty in the object!!
MyNamespace.FileConfig oConfig = configuration
as
MyNamespace.FileConfig;
result;
} }
Posted 18 Feb 2011 Link to this post
Posted 20 Feb 2011 Link to this post
Posted 21 Feb 2011 Link to this post