then, create one generic handler in your project and put this code,
public class rating : IHttpHandler {
public void ProcessRequest (HttpContext context) {
// Do whatever you want here with your rated score, which you can get using context.Request.QueryString["score"]
context.Response.Write("rated."); //don't forget this line.
}
public bool IsReusable {
get {
return false;
}
}
}
edit your jquery raty code with this to call this handler by ajax postback,
For Star Rating,I strongly you using Rate Control,and this is an AJAX-based control。You have to download the control from Microsoft website and then use it。
vietquang_dh...
Member
73 Points
51 Posts
Star Rating for web
Mar 13, 2012 12:11 AM|LINK
Hi all!
I want to make a star rating on my web.
My web is ASP.Net
Please help me. Give me a code if possible.
Thanks so much!
Will "Mark as Answer" if its help
pratik_galor...
Participant
1483 Points
330 Posts
Re: Star Rating for web
Mar 13, 2012 05:30 AM|LINK
First of all put this jquery raty plugin in your page,
http://www.wbotelhos.com/raty/
then, create one generic handler in your project and put this code,
public class rating : IHttpHandler { public void ProcessRequest (HttpContext context) { // Do whatever you want here with your rated score, which you can get using context.Request.QueryString["score"] context.Response.Write("rated."); //don't forget this line. } public bool IsReusable { get { return false; } } }edit your jquery raty code with this to call this handler by ajax postback,
$(document).ready(function() { $('.rating').raty({ click: function(score, evt) { jQuery.ajax({ type: "GET", url: "handlers/rating.ashx", data: "score=" + score }); } }); });Software Engineer,
iGATE Global Solutions.
pratik_galoria@yahoo.co.in
+91-8905195943
shalabhk
Member
24 Points
7 Posts
Re: Star Rating for web
Mar 13, 2012 01:44 PM|LINK
hey may be this will help u out. Check it..
http://www.mikesdotnetting.com/Article/114/jQuery-Star-Rating-with-ASP.NET-MVC
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: Star Rating for web
Mar 15, 2012 01:18 AM|LINK
For Star Rating,I strongly you using Rate Control,and this is an AJAX-based control。You have to download the control from Microsoft website and then use it。
Sample looks like this:
http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/Rating/Rating.aspx