Click here to Skip to main content
16,016,759 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everybody,

I want to upload file when i click upload button in every datalist column. If anybody know plz help me.
Posted
Comments
Sandeep Mewara 5-May-11 2:37am    
Tried anything? Google?
Jayanthi-SE 5-May-11 2:47am    
no

1 solution

try this Code

XML
<asp:DataList ID="DataList1" runat="server" OnItemCommand="DataList1_ItemCommand"
                        RepeatColumns="3" RepeatDirection="Vertical">
                        <HeaderTemplate>
                            Items
                        </HeaderTemplate>
                        <ItemTemplate>
                            <table cellpadding="2" cellspacing="2" width="80%">
                                <tr>
                                    <td>
                                        ItemId:<%# DataBinder.Eval(Container.DataItem, "Id") %>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        ItemName:
                                        <%# DataBinder.Eval(Container.DataItem, "Name") %>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        ItemPrice:<%# DataBinder.Eval(Container.DataItem, "Description") %>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:FileUpload ID="FileUpload1" runat="server" />
                                    </td>
                                </tr>
                            </table>
                        </ItemTemplate>
                    </asp:DataList>
 
Share this answer
 
Comments
Jayanthi-SE 5-May-11 2:49am    
ok will try now. thanks
Jayanthi-SE 5-May-11 2:54am    
how to find file upload id after binding datalist?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900