473,804 Members | 3,272 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DDL Image runs slow, need suggestion on optimization

I have a 10 row (per page) gridview where the first column is a small image
under 100x200px and the second column is a DropDownList template that
selects which image to show in the first column. This works, but I noticed
that when I click the DDL and select another image, all the images on the
page get refreshed. There are as few as 3 images and not more than 7 per
row. Worst case would be 7x10 = 70 small images that need to be loaded.
Ideally they should be loaded only once when the page is first displayed.

I was wondering how I can speed this up so that there is no need to post
back to the server to get the image. The images are not static, they are
calculated, but during page load (or data bind) I know how many images there
are at max and how to calculate them. I was wondering if I could store them
somewhere on the page but only display the image that corresponds to the
index of the DDL in the second column. I do not know how to do that.

Scrolling the first column would also work, but how do I concatenate 3 to 7
images together? Currently, if the user clicks on the small image I launch
the full size image into a new window or IE7 tab. I would still need that
functionality.

Alternately, a real DDL image combo box would be nice, but I didnt see how
to put one together in the first place so I came up with my current scheme
of using two columns.

...TIA..
--
=============== =============== =============== =============== ===========
Beemer Biker joestateson at grandecom dot net
http://TipsForTheComputingImpaired.com
http://ResearchRiders.org Ask about my 99'R1100RT
=============== =============== =============== =============== ===========
Nov 7 '06 #1
2 1627
switch to client script. any javascript book will tell you how to do this.

-- bruce (sqlwork.com)

"Beemer Biker" <js*******@swri .eduwrote in message
news:12******** *****@corp.supe rnews.com...
>I have a 10 row (per page) gridview where the first column is a small image
under 100x200px and the second column is a DropDownList template that
selects which image to show in the first column. This works, but I noticed
that when I click the DDL and select another image, all the images on the
page get refreshed. There are as few as 3 images and not more than 7 per
row. Worst case would be 7x10 = 70 small images that need to be loaded.
Ideally they should be loaded only once when the page is first displayed.

I was wondering how I can speed this up so that there is no need to post
back to the server to get the image. The images are not static, they are
calculated, but during page load (or data bind) I know how many images
there are at max and how to calculate them. I was wondering if I could
store them somewhere on the page but only display the image that
corresponds to the index of the DDL in the second column. I do not know
how to do that.

Scrolling the first column would also work, but how do I concatenate 3 to
7 images together? Currently, if the user clicks on the small image I
launch the full size image into a new window or IE7 tab. I would still
need that functionality.

Alternately, a real DDL image combo box would be nice, but I didnt see how
to put one together in the first place so I came up with my current scheme
of using two columns.

..TIA..
--
=============== =============== =============== =============== ===========
Beemer Biker joestateson at grandecom dot net
http://TipsForTheComputingImpaired.com
http://ResearchRiders.org Ask about my 99'R1100RT
=============== =============== =============== =============== ===========

Nov 7 '06 #2
"bruce barker (sqlwork.com)" <b_************ *************@s qlwork.comwrote
in message news:OJ******** ******@TK2MSFTN GP02.phx.gbl...
switch to client script. any javascript book will tell you how to do this.

-- bruce (sqlwork.com)
Thanks bruce, yes, I did get it into jscript and it works much better. I
replaced the two columns in my grid (image and ddl) with a single column
that was a template and added htmlimages to the panel I had put on it. It
still takes a while for all the images to load, but I am going to make
"thumbs" of the images and not have them created on the fly.

// pngString = "python script produces small png for each
channel(i)"
HtmlImage thisSpectrum = new HtmlImage();
thisSpectrum.St yle.Add(HtmlTex tWriterStyle.Bo rderStyle,
"solid");
thisSpectrum.St yle.Add(HtmlTex tWriterStyle.Bo rderWidth,
"1px");
thisSpectrum.At tributes.Add("t itle", "Channel " + (1+i));
thisSpectrum.At tributes.Add("o nclick", "return
SpectrumImages_ onclick('" + pngString + "&plotwidth=800 &plotheight=600 ')");
thisPanel.Contr ols.Add(thisSpe ctrum);

The above gave me a nice horizontal scrolling panel of spectrum images, each
image could be clicked on to get a larger image in another window or tab.
This worked much better as there was no post back.
--
=============== =============== =============== =============== ===========
Beemer Biker joestateson at grandecom dot net
http://TipsForTheComputingImpaired.com
http://ResearchRiders.org Ask about my 99'R1100RT
=============== =============== =============== =============== ===========
Nov 8 '06 #3

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

Similar topics

1
1413
by: Christopher Brandsdal | last post by:
Hi! I'm currently working on cms gallery. I need a component that can take images +/- 800kb and resize them into tumbnails. I have used AspJpeg until now, but I think it's a little slow.. Do any of you have any suggestion about what's the best upload component and image component to put together in a app? my need is for speed ;)
8
12208
by: Yves PEYSSON | last post by:
Hi, I want to display the same image (from the same file) at different positions in a window. Up to now I used DIV command in the body part of the text, and document.getElementById in order to place it at the right place. But when I do that several times, only the last position is displayed. How to show all positions ? Thanks Yves
21
3081
by: DraguVaso | last post by:
Hi, I have an inherited DataGrid, that does lots of extra stuff. For exemple drawing a backgroundimage in every cell. The problem is that it's taking too much time (using gdi+), so I want to do it using DirectX. I downloaded already the DSK etc, but I can't find how I need to draw an image on a given position. I don't need stuff to write advanced 3D-games, just painting that image. Can anybody help me with this? I'm already looking for...
4
8385
by: Kevin Myers | last post by:
Hello, Please forgive my reposting of this note with hopefully a more relevant subject line. On an Access 2000 form under Windows 2000 I would like to use a Kodak Image Edit Control to display the contents of a TIFF image file. According to the very limited documentation that I have been able to locate so far, all I should need to do is to drop the Image Edit Control onto the form in design mode, set the control's Image property to...
5
4194
by: Michael B Allen | last post by:
I think I recall the modulo operator can be slow on some architectures. Or will even trivial compiler optimization factor it out? My specific problem is how to convert from milliseconds to seconds and nanoseconds (POSIX timespec value): struct timespec timeout; timeout.tv_sec = millis / 1000; /* seconds */ timeout.tv_nsec = (millis % 1000) * 1000000; /* nanoseconds */
6
8572
by: Saya | last post by:
Hello, This is a repost 'cause I haven't solve the problem: I can't use the System.Drawing class 'Image.FromStream' in the CompactFramework environment. What I've done with respect to Brendan's suggestion is as follows: Brendan, thanks for the reply! I'm a little bit further now, but not yet finished. I've come this far, see code below: Stream s =
20
2041
by: hufaunder | last post by:
I have 16-bit data that I want to display. In order to display it I compress a certain range of the input data into 8 bit (I need control over this). All seems to work ok except that it is dead slow both in release and debug mode. The main problem is the for-loop shown in the code bellow. Without the for-loop I can get somewhere around 10-20 updates/second. With the for-loop I get an update every 2-3 seconds. The strange thing is that when...
25
3813
by: jwrweatherley | last post by:
I'm pretty new to python, but am very happy with it. As well as using it at work I've been using it to solve various puzzles on the Project Euler site - http://projecteuler.net. So far it has not let me down, but it has proved surprisingly slow on one puzzle. The puzzle is: p is the perimeter of a right angle triangle with integral length sides, {a,b,c}. which value of p < 1000, is the number of solutions {a,b,c} maximised? Here's my...
4
2219
by: ttest | last post by:
Hello, I'm working on an image processing project using the Python Imaging Library along with numpy. Right now, I'm trying to build a speedy script for converting whole images between the RGB and the HSV (a.k.a. HSB) color spaces. Unfortunately, the code I've made so far runs dreadfully slow with even moderate-sized images. I'm under the impression that the crux of the problem is the fact that PIL's point method operates on only one...
0
9708
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9588
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10589
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10327
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7625
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5527
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4302
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3828
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2999
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.