c# - Uploading File/s to Gridview rows as needed and display in the same Column after uploading -
i want upload files gridview , display file name/s after upload completed.
below aspx file has generated gridview. how achieve file upload? thank in advance.
<asp:commandfield showselectbutton="true" /> <asp:boundfield datafield="id" headertext="id" sortexpression="id" /> <asp:boundfield datafield="date" headertext="date" dataformatstring="{0:dd/mm/yyyy}" sortexpression ="date" /> <asp:boundfield datafield="name" headertext="name" sortexpression="name" /> <asp:boundfield datafield="address" headertext="address" sortexpression="address" /> <asp:boundfield datafield="phone" headertext="phone" sortexpression="phone" /> <asp:boundfield datafield="email" headertext="email" sortexpression="email" /> <asp:boundfield datafield="source" headertext="source" sortexpression="source" /> <asp:boundfield datafield="message" headertext="message" sortexpression ="message" /> <asp:templatefield headertext="upload"> <itemtemplate> <asp:fileupload id="fileupload1" runat="server" enableviewstate="true" /> <asp:button id="savebtn" runat="server" commandargument="<%# container.dataitemindex%>" commandname="save" text="ok"/> </itemtemplate> </asp:templatefield>
<asp:templatefield headertext="upload"> <itemtemplate> <asp:fileupload id="fileupload1" runat="server" enableviewstate="true" /> </itemtemplate> </asp:templatefield>
this code fulfills requirement simply!
Comments
Post a Comment