0
Hi all..
I have checked all the links..
I have made multiple file upload by using jquery uploadify plugin.
GridView Design -
------
For First Record - I need to upload 3 image files.
For Second Record - I need to upload 2 image files.
Result in database -
ID
| RecordID | File |
1 | 1 | img1.jpg |
2 | 1 | img2.jpg |
3 | 1 | img3.jpg |
4 | 2 | img4.jpg |
5 | 2 | img5.jpg |
How do I make a loop ?
Foreach(gridviewrow row in grdData.rows)
{
String rowid = row.cells[2].text.trim();
FileUpload fup = (FileUpload)row.FindControl("DataFileUpload") as FileUpload;
In HttpPostedFiles ; Total count = 5 files I am getting.
How to go further .. Please guide...
}
--
How to find out - that in each row - how many files the user have selected in gridview ?
Please guide... It is a bit urgent and important...
Thanks a ton in advance .....
0
Hi all..
In GridView, I have 3 columns as below -
ID | Name
| |
1 | A | Browse |
2 | B | Browse |
3 | C | Browse |
4 | D | Browse |
For record-1 (ID = 1), I have to upload 2 image files (img1.jpg and img2.jpg).
In database, I want to insert the following -
ID | Name | File |
1 | A | img1.jpg |
2 | A | img2.jpg |
Similarly, for record - 2(ID=2), I have to upload 3 image files. Hence , 3 records for this are to be inserted.
How to I do this logic ? Please guide..
0
Hi,
Try this link below..
https://vinayakshrestha.wordpress.com/2008/02/19/aspnet-gridview-multiple-files-upload/
Abhishek
0
Hello..
Thank you so much ...
I am using FileUpload Control and not textbox. The "runat" attribute is added...
Also, Page Name ins @Page Directive and in Code-behind are same.
My Requirement is -
In the gridview against each row, I have to give a facility to upload multiple files.
0
Issue occurs due to following reason:
1. Check your control attributes may be the tag is not properly formatted(
<asp:textbox id="txt" runat="server">
2. In your aspx file,instead of using Codefile use CodeBehind attribute
Follow below link that may help you.
http://stackoverflow.com/questions/706603/the-name-controlname-does-not-exist-in-the-current-context
http://stackoverflow.com/questions/19027025/name-does-not-exist-in-the-current-context