Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7544171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T08:36:50+00:00 2026-05-30T08:36:50+00:00

i’m creating a shopping website. i have a gridview that is bound to an

  • 0

i’m creating a shopping website. i have a gridview that is bound to an objectdatasource control for administration tasks. this grid is responsible for showing the items table in a sql server database. each item also might or might not have a picture. so when this grid is shown to the admin i want a small thumbnail of the associated image to be available for each row. here is the gridview code:

<asp:GridView ID="gridview1" runat="server" 
   DataSourceID="objDataSource" DataKeyNames="item_id">
    <Columns>
        <asp:BoundField DataField="item_category" Visible="false" />
        <asp:BoundField HtmlEncode="true" DataField="item_name" 
            HeaderText="Item Name" />
        <asp:BoundField HtmlEncode="true" NullDisplayText="Not Set" 
            DataField="item_desc" HeaderText="Item Description" />
        <asp:TemplateField HeaderText="Item Picture"
            ItemStyle-Width="40px" ItemStyle-Height="40px">
            <ItemTemplate>
                <!-- here should be the image -->
            </ItemTemplate>
        </asp:TemplateField>
        <asp:CommandField ButtonType="Button" ShowSelectButton="True"
            HeaderText="Selecting" />
    </Columns>
</asp:GridView>

i’m only aware of two options when it comes to showing image in the browsers:

  • save a bitmap on the response stream. this will not be inside of gridview when it renders to client(correct?).
  • save a bitmap on hard drive after the select statement and use an image control inside of template then assign the ImageUrl attribute dynamically.

second option is too expensive because it needs writing and reading on a hard drive for each image(or datarow). so how can i do this? is it even possible?

ps: ajax is not an option.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T08:36:51+00:00Added an answer on May 30, 2026 at 8:36 am

    Create an ASP.NET Web Handler (.ashx file) that handles your image, pass the id of the image to your gridview and create a “link” to that image handler that will either display the image if it exists, or possibly display a ‘no image available’ image

    Here is a quick tutorial on ASHX files: http://www.dotnetperls.com/ashx

    I can post additional code if you need it

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have some data like this: 1 2 3 4 5 9 2 6
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.