webform Upload控件请教
使用C1Upload控件上传文件时,在API文档和sample中均没有找到如何获取上传文件的文件路径,文件名的方法。您好,请参考 https://demo.grapecity.com.cn/ComponentOne/ASPNET/ControlExplorer/C1Upload/Overview.aspx,这个demo,具体代码请参考
protected void u1_ValidatingFile(object sender,
C1.Web.Wijmo.Controls.C1Upload.ValidateFileEventArgs e)
{
var file = e.UploadedFile;
// remove foreach
// foreach (C1FileInfo file in C1Upload1.UploadedFiles)
try
{
//validate file
// Note: In this arg, "TempFileName" and "FileName" is a read-only property.
// you can pass a message in “e.Message”
}
catch (Exception ex)
{
//handle exception
}
}
页:
[1]