473,407 Members | 2,359 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

How to hide rows with spacer images (1x1 pixel) in asp.net gridview

Hi There,

I am trying to display images in a gridview and display only valid
images from the html in the database (and not display spacers, 1x1
pixel images etc). For this, I have a gridview with an asp:Image
control in one of its template. I populate the image by setting the
imageurl (remote url) of the image in the rowdatabound event of the
gridview. I have an aspx page called draw.aspx and i do it this way..

imageurl = draw.aspx?imageurl=url

In the draw.apxz.cs, i have a method which takes the url and using the
webclient, creates a bitmap and saves that to the response like this..

bmp.Save(Response.OutputStream, bmp.RawFormat);

This works fine, but all images are displayed in the gridview. I would
like to check for the height and width of the image and not show the
rows of the gridview based on those attributes. . I am doing it in the
PreRender event, trying to check the height and width of the image in
each row of the gridview. For some reason, if I debug the code, I see
that both height and width of the image are 0. First thing, I am not
sure why both are 0. Secondly, I am wondering what is the best way of
checking this and where(which event) should this be checked?

I really appreciate your suggestions and recommendations.

Thanks a lot!!

May 29 '07 #1
0 1164

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Zambien | last post by:
Hi all, Here's my problem. I have tables that are using the menu/submenu idea for hiding rows. This works fine in IE (of course) and does show/hide correctly in netscape, but as soon as the...
0
by: Paul Rohorzka | last post by:
Hi! I'm currently trying to create a 1x1 Pixel BMP in an OLE field of my mdb. To see how the color is coded in that data, I created several records with some characteristic colors of my pixel...
3
by: ClearWater | last post by:
Please explain in detail include needed code.
1
by: Hamster | last post by:
How can I draw 1x1 pixel dot?
15
by: Thomas W | last post by:
How can I use python to find images that looks quite similar? Thought I'd scale the images down to 32x32 and convert it to use a standard palette of 256 colors then compare the result pixel for...
2
by: neuneudr | last post by:
Hi everybody, I'm scratching my head with a CSS problem. I want to have the following (the two pics have these size for a good reason, the whole point of the page is basically to show these...
3
by: kevinpublic | last post by:
I have an item list for ordered products on a data grid in VS 2003. It's an ASP page running VB behind it. All detail lines display as well as all shipping charges. On the edit screen, we allow...
4
by: Luqman | last post by:
I have populated the Child Accounts and Parent Accounts in a Grid View Control, I want to hide the Select Column of Parent Accounts, but not the Child Accounts, is it possible ? I am using VS...
7
by: Stephen.Schoenberger | last post by:
Hello, I am reading in a bitmap image and storing it as a bitmap in C#. I need to perform some mathmatical operations on that image but it needs to be broken up into smaller fragments (16x16)....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.