asp.net - Use AsyncFileUpload in a grid view in update panel -


i want use asyncfileupload in grid view , each record must have asyncfileupload individually. in addition user must able upload his/her file each record. how can access asyncfileupload in grid view , check if has file or not? common file upload have used below cod:

((fileupload)gridview1.rows[idx].cells[0].findcontrol("fileupload1") fileupload).hasfile 

however, not acceptable in situation. there way access ajax controller in grid view?

on asyncfileupload bind onuploadedcomplete event method

onuploadedcomplete = "fileuploded" 

code:

protected sub fileuploded(object sender, eventargs e)      dim fu ajaxcontroltoolkit.asyncfileupload      dim row gridviewrow = ctype(fu.namingcontainer, gridviewrow)     dim idx = row.rowindex      fu = ctype(sender,ajaxcontroltoolkit.asyncfileupload)     if fu.hasfile     --do something--     end if  end sub 

c#:

protected void fileuploded(object sender, eventargs e) {     asyncfileupload fu = (ajaxcontroltoolkit.asyncfileupload)sender;      gridviewrow row = (gridviewrow)fu.namingcontainer;     string idx = row.rowindex.tostring();        } 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -