SqlConnection CN = new SqlConnection("server=localhost;Initial Catalog=ado2;user id=sa; password=sa"); SqlDataAdapter ADAP = new SqlDataAdapter("Select * from ImagesStore", CN); DataSet DS = new DataSet(); ADAP.Fill(DS, "ImagesStore"); dataGridView1.DataSource = DS.Tables["ImagesStore"];
SqlConnection CN = new SqlConnection("server=localhost;Initial Catalog=ado2;user id=sa; password=sa"); SqlDataAdapter ADAP = new SqlDataAdapter("Select * from ImagesStore", CN); DataSet DS = new DataSet(); ADAP.Fill(DS, "ImagesStore"); GridView1.DataSource = DS.Tables["ImagesStore"]; GridView1.DataBind();
<asp:GridView ID="GridView1" runat="server"> <Columns> <asp:TemplateField> <ItemTemplate> <asp:Image ID="Image1" Height="75px" Width="75px" ImageUrl='<%# bind("ImageData")%>' runat="server" /> </ItemTemplate> </asp:TemplateField> <asp:TemplateField> <ItemTemplate> <asp:Label ID="l1" Height="75px" CssClass="allign" runat="server" Text='<%# Bind("ImageId")%>'></asp:Label> </ItemTemplate> </asp:TemplateField> <asp:TemplateField > <ItemTemplate> <asp:Label ID="l2" Height="75px" CssClass="allign" runat="server" Text='<%# Bind("OriginalPath")%>'></asp:Label> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)