pictures in gridview

michkyutie

Member
Joined
Jan 10, 2009
Messages
11
Programming Experience
Beginner
i also want to ask about asp.net

we are using microsoft web developer 2005 express edition...

i juzt wanna ask how to insert/upload pictures in gridview and putting them in one folder...also, how to update those uploaded pictures...

thanks for the help..
 
To upload pictures you can use FileUpload Class which displays a text box control and a browse button that enable users to select a file to upload to the server.Example provided !

If you want to have nested fileupload controls to the gridview you should put them inside template field.

rough example:

VB.NET:
<asp:GridView ID="GridView1" runat="server">
           <Columns>
           <asp:TemplateField>
                  <ItemTemplate>
                          <asp:FileUpload ID="upcrtl" runat="server" />
                  </ItemTemplate>
           </asp:TemplateField>

           <asp:TemplateField>
                  <ItemTemplate>
                         <asp:Label ID="name" runat="server" Text='<%# Eval("name") %>' />
                  </ItemTemplate>
            </asp:TemplateField>
        </Columns>
</asp:GridView>

If i am missing the point please explain better your problem. Thanks
 
Back
Top