473,394 Members | 1,371 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,394 software developers and data experts.

Ajax Rating control CurrentRating as double

Joe
I want the CurrentRating to be a double instead of an int. I made the
changes in the code but now the stars always fill with 1 more then it should
if the CurrentRating has a decimal value.

I tried to change the RenderContents method too:
int currentRating = Convert.ToInt32(Math.Floor(this.CurrentRating));

But this still doesn't do anything. I can see in the loop below where it is
setting the class that it sets the fill and empty the right number of times
but when the page displays there is one for.

For example if the CurrentRating = 3.2. There will be 4 stars colored in.

Is there another place that this need to be changed as well?

Thanks,
Joe
Dec 22 '07 #1
1 1943
Joe
It looks like there were a few places in the .js code that I didn't notice
before that needed a Math.floor();

"Joe" <jb*******@noemail.noemailwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>I want the CurrentRating to be a double instead of an int. I made the
changes in the code but now the stars always fill with 1 more then it
should if the CurrentRating has a decimal value.

I tried to change the RenderContents method too:
int currentRating = Convert.ToInt32(Math.Floor(this.CurrentRating));

But this still doesn't do anything. I can see in the loop below where it
is setting the class that it sets the fill and empty the right number of
times but when the page displays there is one for.

For example if the CurrentRating = 3.2. There will be 4 stars colored in.

Is there another place that this need to be changed as well?

Thanks,
Joe

Dec 23 '07 #2

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

Similar topics

10
by: Showjumper | last post by:
There are 3 or so different AJAX libs that are out there available for use - Anthem.NET AJAX.Net Atlas Atlas as i undserstand it is for ASP.NET 2.0. What about about the other 2? Any comments,...
1
by: www.web20developers.com | last post by:
http://www.web20developers.com http://www.web20developers.com/index.php?option=com_content&task=view... Ajallerix : AJAX, simple, fast Web image gallery demo ; at Novell AJAX -...
4
by: bp90210 | last post by:
If you have a few minutes, I would like to see if anyone can help me out. I'm trying to modify a rating script. Currently, It allows you to vote over and over. What I want to do is after you vote...
3
by: randommale9999 | last post by:
I was wondering how people are able to create ajax applications like star ratings scripts without having bots hit the scripts. I have a star rating script on my site which was getting hit by bots....
0
by: baijuraj | last post by:
I added an Ajax Rating Control in a GridView using the code <asp:TemplateField HeaderText="Rating"> <ItemTemplate> ...
1
by: Joe | last post by:
I need to add a rating control to our page so I thought I would try the AJAX one. Well after making all the changes to my web.config for AJAX it turns out that the control still doesn't display. ...
4
by: pablorp80 | last post by:
Hello, Here is what I need: I need the focus and the cursor set to a textbox named txtGT, every time no matter if it is the first page load or whether it is a postback. Here is the problem: I...
1
by: lamarant | last post by:
Hi...I'm trying to use the Rating Control in the Ajax Toolkit in a datalist. I have the control showing up in the list, with the logged in users current rating for each item in the list showing... ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...
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...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.