您好,请参考 https://demo.grapecity.com.cn/Co ... pload/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
- }
- }
复制代码
|