jQuery Star Rating Plugin Web Method Call with ASP.Net

I started playing with the jQuery Star Rating Plugin v3.14. But, I could not really find a good way to make web method calls or a decent write up of how to use it with ASP.Net.

So, I added auto-submit-star to the markup for it to make the callback, added runat=”server”, and a hidden field with the record id.

<input name="star1" type="radio" class="auto-submit-star" runat="server">
<input name="star1" type="radio" class="auto-submit-star" runat="server">
<input name="star1" type="radio" class="auto-submit-star" runat="server">
<input name="star1" type="radio" class="auto-submit-star" runat="server">
<input name="star1" type="radio" class="auto-submit-star" runat="server">
<asp:HiddenValue id="hfRatingID" runat="server"/> 

After that, added the following script that performs the jQuery Web Method call

$(".auto-submit-star").rating({ callback: function (a, b) { 
PageMethods.RateIt( $(this).siblings('input[id*="hfRatingID"]').val(), a) 
}})

Then makes web method call to a static class in code behind

[System.Web.Services.WebMethod()]
[System.Web.Script.Services.ScriptMethod()]
public static void RateIt(int id, string value) // Method have to be static { 
// Make call to update DB rating value 
}

Now you should be able to make an asynchronous call for users to rate an item. Hope this helps.

WP7 Windows Phone 7 Wish List

Nokia has recently released the Lumia 900 which is the WP7 flagship model at a great price. I had some time to play with it and overall the hardware looks and feels solid. However, I have a few complaints such as no memory card slot, no battery replacement, or the ability to change the Sim card without some sort of tool. On the software front, the OS has not changed much since I sold my Samsung Focus last year.

Windows Phone 7 has been in the market more than a year and has failed to steal the spotlight from Android and iPhone. To most power users, it still does not feel like a smart phone but more like an improvement from a feature phone. I am going to list several things I wish WP7 had but will probably not materialize until WP8 during the 2012 holiday season and very likely will never be on a Lumia 900.

  1. Microsoft is pushing the cloud everywhere and WP7 is not the exception. You got 20GB available in your SkyDrive. Therefore, they decided to drop support for memory card slots. If it is up to Microsoft you are pretty much stuck with whatever memory came with your phone. The Samsung Focus came with an option to install one but it required formatting the phone and you would never be able to take it out without having to reformat.  With Micro SD card prices constantly going down and increasing in size, it makes me sad that WP7 does not have this option.
  2. This one is probably more for Audiophiles but it is not possible to store music in Lossless formats on a WP7 phone. On my Zune HD, I was able to store WMA Lossless songs. However, WP7 devices will downconvert your music files to a WMA Lossy codec when trying to copy Lossless files to it. Again, this is probably a space concern. Maybe they don’t want you downloading big files from the cloud. iPhones let you use ALAC and Androids and Blackberries will even let you play FLAC files. Continue reading “WP7 Windows Phone 7 Wish List”

If Cell Phone and ISP Companies ran the other utilities companies

Gone are the days when you could go into a store and get an unlimited data plan. Even though it is advertised as unlimited, that is seldom the case anymore. You got cable companies such as AT&T and Comcast that have caps of 150GB and 250GB a month respectively among others. Some companies will charge you a fee but others will deny service after a repeat offense. These caps are probably in place to prevent streaming subscribers to services such as Netflix, Hulu Plus, or Amazon Prime to hog all the bandwidth.
A few years ago it was mostly believed that if a consumer used a lot of bandwidth, he or she was using bittorrent and downloading illegal music and movies. This is not the case anymore, Netflix alone accounts for more traffic than bittorrent. Even Comcast was caught sniffing your data to find out if you were using bittorrent to then throttle and slow down you data.
Some years have passed, and now with smart phones being nearly ubiquitous users hogging the data is still a problem. Verizon will offer you 4GB of unlimited data, AT&T has similar caps and they will charge you extra if you go over. T-Mobile will not charge you extra but they will slow down your data after your allowance. Hours of using Music and Movie apps such as Pandora and YouTube will quickly deplete your data allowances. C-Spire, previously known as Cellular South, Continue reading “If Cell Phone and ISP Companies ran the other utilities companies”

Strickland’s Letter

About two years ago when the Football World Cup was going on in South Africa, I decided I had earned a nice over the top all leather La-Z-Boy. To my surprise, the only place in town that carries them is a furniture store called Strickland’s. I had to give them my address for them to deliver it to my place.
Now after two years, I still get letters in the mail from Strickland’s every now and then. The last letter I got reads:

“Bring this letter with you during the week of 4/16/12 and take 50% off of 50% of your full purchase. That’s half off regular price of half of your purchase. Buy one piece, a room full or a house full and take 50% off of 50% of your total purchase.”

I didn’t make this up, you can click on the image to maximize it. I think this is a coupon for 25% off but they said 50% so many times and half that I am not sure if it is a coupon for 12.5% or 6.25%. I have a feeling that if I go there they will ask me to pay double for the first half and twice the second half. I also find it funny how they start the letter with “Dear Valued Customer”. Not only they think their customers are so valuable they won’t even address the letter to their names, they also insult the poor senior citizens walking in with what they think is a 50% off coupon. Letter attached after the break. Feel free to print it if you want to get this deal, LOL…

Continue reading “Strickland’s Letter”

ALTERRA Coffee does not even call to say thanks…

One morning craving caffeine, I decided to try the coffee machine at the office because I was too lazy to brew some real coffee. This machine comes with little packages that you can just insert into the machine to brew the coffee of your choice. So, I figured I will try the Colombian, how bad could it be? It was not horrible but the geography on the cover shows all hope is lost for the education system in America.

The one on the left is correct but the one on the right has the North Pacific Ocean north of Panama and the Caribbean Sea in the middle of the Atlantic. I wrote a letter to point this out to ALTERRAcoffee.com and to tell them to put the Caribbean Sea where they had the North Pacific Ocean. I never heard back from them, but to my surprise a couple of months after my letter they actually fixed their packaging. I thought it was hilarious that they actually corrected it and I was kinda disappointed that they did not even sent me a thank you note or you know… a cup of coffee? :p

Continue reading “ALTERRA Coffee does not even call to say thanks…”

Say NO to the SMS “Tax”

As you may already know, the “evil” telecom companies want to squeeze every cent they can out of you by making up fees. SMS or Short Message Service is what is usually described as texting by your carrier. In the last decade before the explosion of smartphone, SMS used to fill a gap where there was little to no connection to the Internet. SMS functioned though SMS centers hence requiring its own infrastructure.

Nowadays, this is completely irrelevant as most smartphones typically use standard mail protocols such as SMTP over TCP/IP. Meaning, if you have a smartphone, it is very likely you are being charged for something that should be covered by your data plan alone. Of course, I am not familiar with pricing from all cell phone companies; however, if you are on a “bundle” plan and texting is part of it, most likely they are just getting a bundle of money from you. Otherwise, if it is clearly spelled out as a separate fee, you might want to consider just not paying for it and using alternatives that require your data plan alone.

There are several apps out there, each one with its limitations, but with more features than SMS.  So far, Kik is my favorite cross platform messaging app as it is free and it is available for iOS, Android, BlackBerry, and WP7. The makers of Kik are currently being sued by RIM, the maker of BlackBerry Messenger Continue reading “Say NO to the SMS “Tax””