473,473 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Image

Hello,

I need to display a ranking using starts. 1 to 5.

Can I create a single star image and then create, at runtime, the
ranking image for each record using 1 to 5 stars?

How can I do this?

Thanks,

Miguel

Oct 12 '07 #1
6 1656
gg
On 12 Oct, 15:02, shapper <mdmo...@gmail.comwrote:
Hello,

I need to display a ranking using starts. 1 to 5.

Can I create a single star image and then create, at runtime, the
ranking image for each record using 1 to 5 stars?

How can I do this?

Thanks,

Miguel
OK so if you have your "ranking" stored somewhere as say an integer 1
to 5 then one simple way would be to have 5 asp image tags and during
page load set their visible attributes to false then do a select case

select case [Your ranking score held in a variable]

case 1
imgid1.visible = true

case 2
imgid1.visible = true
imgid2.visible = true

case 3
imgid1.visible = true
imgid2.visible = true
imgid3.visible = true

case 4
imgid1.visible = true
imgid2.visible = true
imgid3.visible = true
imgid4.visible = true

case 5
imgid1.visible = true
imgid2.visible = true
imgid3.visible = true
imgid4.visible = true
imgid5.visible = true

end select

For sure there would be more elegant ways of acheiving this but your
description of the problem was way to vague to offer anything else.

But the above would work.

Mark


Oct 12 '07 #2
On Oct 12, 3:29 pm, g...@iceeq.com wrote:
On 12 Oct, 15:02, shapper <mdmo...@gmail.comwrote:
Hello,
I need to display a ranking using starts. 1 to 5.
Can I create a single star image and then create, at runtime, the
ranking image for each record using 1 to 5 stars?
How can I do this?
Thanks,
Miguel

OK so if you have your "ranking" stored somewhere as say an integer 1
to 5 then one simple way would be to have 5 asp image tags and during
page load set their visible attributes to false then do a select case

select case [Your ranking score held in a variable]

case 1
imgid1.visible = true

case 2
imgid1.visible = true
imgid2.visible = true

case 3
imgid1.visible = true
imgid2.visible = true
imgid3.visible = true

case 4
imgid1.visible = true
imgid2.visible = true
imgid3.visible = true
imgid4.visible = true

case 5
imgid1.visible = true
imgid2.visible = true
imgid3.visible = true
imgid4.visible = true
imgid5.visible = true

end select

For sure there would be more elegant ways of acheiving this but your
description of the problem was way to vague to offer anything else.

But the above would work.

Mark
I was thinking more of some kind of image manipulation at runtime.

Thanks,
Miguel

Oct 12 '07 #3

That seems like way overkill for a star ranking system.

"shapper" <md*****@gmail.comwrote in message
news:11**********************@e9g2000prf.googlegro ups.com...
On Oct 12, 3:29 pm, g...@iceeq.com wrote:
>On 12 Oct, 15:02, shapper <mdmo...@gmail.comwrote:
Hello,
I need to display a ranking using starts. 1 to 5.
Can I create a single star image and then create, at runtime, the
ranking image for each record using 1 to 5 stars?
How can I do this?
Thanks,
Miguel

OK so if you have your "ranking" stored somewhere as say an integer 1
to 5 then one simple way would be to have 5 asp image tags and during
page load set their visible attributes to false then do a select case

select case [Your ranking score held in a variable]

case 1
imgid1.visible = true

case 2
imgid1.visible = true
imgid2.visible = true

case 3
imgid1.visible = true
imgid2.visible = true
imgid3.visible = true

case 4
imgid1.visible = true
imgid2.visible = true
imgid3.visible = true
imgid4.visible = true

case 5
imgid1.visible = true
imgid2.visible = true
imgid3.visible = true
imgid4.visible = true
imgid5.visible = true

end select

For sure there would be more elegant ways of acheiving this but your
description of the problem was way to vague to offer anything else.

But the above would work.

Mark

I was thinking more of some kind of image manipulation at runtime.

Thanks,
Miguel

Oct 12 '07 #4
gg
On 12 Oct, 15:40, shapper <mdmo...@gmail.comwrote:
On Oct 12, 3:29 pm, g...@iceeq.com wrote:


On 12 Oct, 15:02, shapper <mdmo...@gmail.comwrote:
Hello,
I need to display a ranking using starts. 1 to 5.
Can I create a single star image and then create, at runtime, the
ranking image for each record using 1 to 5 stars?
How can I do this?
Thanks,
Miguel
OK so if you have your "ranking" stored somewhere as say an integer 1
to 5 then one simple way would be to have 5 asp image tags and during
page load set their visible attributes to false then do a select case
select case [Your ranking score held in a variable]
case 1
imgid1.visible = true
case 2
imgid1.visible = true
imgid2.visible = true
case 3
imgid1.visible = true
imgid2.visible = true
imgid3.visible = true
case 4
imgid1.visible = true
imgid2.visible = true
imgid3.visible = true
imgid4.visible = true
case 5
imgid1.visible = true
imgid2.visible = true
imgid3.visible = true
imgid4.visible = true
imgid5.visible = true
end select
For sure there would be more elegant ways of acheiving this but your
description of the problem was way to vague to offer anything else.
But the above would work.
Mark

I was thinking more of some kind of image manipulation at runtime.

Thanks,
Miguel- Hide quoted text -

- Show quoted text -
Sorry Miguel but I'm not sure what help you're after.

I think contributors are going to need a little more to go on.

Can you give a little more info?

Mark

Oct 12 '07 #5
On Oct 12, 4:03 pm, g...@iceeq.com wrote:
On 12 Oct, 15:40, shapper <mdmo...@gmail.comwrote:
On Oct 12, 3:29 pm, g...@iceeq.com wrote:
On 12 Oct, 15:02, shapper <mdmo...@gmail.comwrote:
Hello,
I need to display a ranking using starts. 1 to 5.
Can I create a single star image and then create, at runtime, the
ranking image for each record using 1 to 5 stars?
How can I do this?
Thanks,
Miguel
OK so if you have your "ranking" stored somewhere as say an integer 1
to 5 then one simple way would be to have 5 asp image tags and during
page load set their visible attributes to false then do a select case
select case [Your ranking score held in a variable]
case 1
imgid1.visible = true
case 2
imgid1.visible = true
imgid2.visible = true
case 3
imgid1.visible = true
imgid2.visible = true
imgid3.visible = true
case 4
imgid1.visible = true
imgid2.visible = true
imgid3.visible = true
imgid4.visible = true
case 5
imgid1.visible = true
imgid2.visible = true
imgid3.visible = true
imgid4.visible = true
imgid5.visible = true
end select
For sure there would be more elegant ways of acheiving this but your
description of the problem was way to vague to offer anything else.
But the above would work.
Mark
I was thinking more of some kind of image manipulation at runtime.
Thanks,
Miguel- Hide quoted text -
- Show quoted text -

Sorry Miguel but I'm not sure what help you're after.

I think contributors are going to need a little more to go on.

Can you give a little more info?

Mark
Hi,

I just found good solution:
http://www.asp.net/AJAX/AjaxControlT...ng/Rating.aspx

Thanks,
Miguel

Oct 12 '07 #6
[cut]
I was thinking more of some kind of image manipulation at runtime.
I would do this once for all and would have just 5 images, each image being
the symbol for the corresponding level. This way you are totally free to do
what you want such as using pale colors when the rating is low and adding
glowing effects on those graphics elements.

Else the runtime manipulation could be as easy as rendering n time the same
image when the rating is n. Doing something more sophisticated would be
useless as it would produce anyway only 5 distintcs results you could just
produce once for all...

--
Patrice
Oct 12 '07 #7

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

Similar topics

9
by: Pierre Tremblay | last post by:
Hi! I am trying to display an image in my html document. The document contains the following line: <td class="Input"><img...
3
by: dave | last post by:
Hello there, I am at my wit's end ! I have used the following script succesfully to upload an image to my web space. But what I really want to be able to do is to update an existing record in a...
8
by: Jef Driesen | last post by:
I'm implementing some image processing algorithms in C++. I created a class called 'image' (see declaration below), that will take care of the memory allocations and some basic (mathematical)...
6
by: QuasiChameleon | last post by:
Hi, I'm trying to create a grayscale image class that reads and writes grayscale Targa format. This works well with smaller images, but corrupts larger images and creates a "Segmentation fault...
15
by: Anand Ganesh | last post by:
HI All, I have an Image. I want to clip a portion of it and copy to another image. How to do this? I know the bounding rectangle to clip. Any suggestions please. Thanks for your time and...
7
by: lgbjr | last post by:
Hello All, I¡¯m using a context menu associated with some pictureboxes to provide copy/paste functionality. Copying the image to the clipboard was easy. But pasting an image from the clipboard...
15
by: David Lozzi | last post by:
Howdy, I have a function that uploads an image and that works great. I love ..Nets built in upload, so much easier than 3rd party uploaders! Now I am making a public function that will take the...
6
by: comp.lang.php | last post by:
/** * Generate the random security image * * @access public * @param $willUseFilePath (default false) boolean to determine if you will be using a file path * @param mixed $filePath (optional)...
1
by: bharathv6 | last post by:
i need to do is modify the image in memory like resizing the image in memory etc ... with out saving it disk as i have to return back the image with out saving it disk PIL supports the use of...
0
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information...
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
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,...
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...
1
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.