Click here to Skip to main content
Click here to Skip to main content
Articles » Web Development » ASP.NET » Samples » Downloads
Add your own
alternative version

GridViewImages from DB in ASP.NET using C#

, 26 Jun 2009 CPOL
GridViewImages from DB in ASP.NET using C#
DataGridImages in C# using Handler
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<html xmlns="" >
<head runat="server">
    <title>Untitled Page</title>
    <form id="form1" runat="server">
        <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Style="z-index: 100;
            left: 109px; position: absolute; top: 159px" Text="Save Image" />
        <asp:FileUpload ID="FileUpload1" runat="server" Style="z-index: 101; left: 2px; position: absolute;
            top: 97px" />
        <asp:GridView ID="GridView1" runat="server" AllowSorting="true" DataKeyNames="Img_Id" Style="z-index: 102; left: 403px; position: absolute;
            top: 52px" AutoGenerateColumns="false">
            <asp:BoundField DataField="Img_Id"  />
    <asp:Image ID="Image1" runat="server" ImageUrl='<%#    "Handler.ashx?id=" + Eval("Img_Id")  %>' /> 
        <asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click" Style="z-index: 104;
            left: 241px; position: absolute; top: 261px">ShowImages</asp:LinkButton>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


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


About the Author

Naga Sridhar Madiraju
Web Developer Pasca Software Solutions
India India
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.1411023.1 | Last Updated 26 Jun 2009
Article Copyright 2008 by Naga Sridhar Madiraju
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid