ajax中的asp评级控制更新 [英] asp rating control update in ajax
本文介绍了ajax中的asp评级控制更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何通过Javascript更新asp.net ajax评级控制值。我的页面中有多个评级控件。所以我无法访问它们
How can I update asp.net ajax rating control value by Javascript. There are multiple rating controls in my page. So I can not have access to them by
function SetParentReview(appid) {
var ratingValue = $find("rt_" + id).get_Rating();
$find("rcGrid_" + appid).set_Rating(Number(2));
}
这两行都无法访问控件。在我的gridview中,它如下所示。
these both lines can not access the control. In my gridview it is as follows.
<ajax:Rating ID='rcGrid_' BehaviorID='rcGrid_<%# Eval("AppId") %>' CurrentRating='<%# Eval("avgRating") %>' runat="server" StarCssClass="ratingEmpty" WaitingStarCssClass="ratingSaved" EmptyStarCssClass="ratingEmpty" FilledStarCssClass="ratingFilled">
如何在jav中访问这些控件后更新ascript。
also how can i update after accessing these controls in javascript.
推荐答案
find( rt _ + id).get_Rating();
find("rt_" + id).get_Rating();
find( rcGrid_ + appid)。set_Rating(Number( 2 ));
}
find("rcGrid_" + appid).set_Rating(Number(2)); }
这两行都无法访问控件。在我的gridview中,它如下所示。
these both lines can not access the control. In my gridview it is as follows.
<ajax:Rating ID='rcGrid_' BehaviorID='rcGrid_<%# Eval("AppId") %>' CurrentRating='<%# Eval("avgRating") %>' runat="server" StarCssClass="ratingEmpty" WaitingStarCssClass="ratingSaved" EmptyStarCssClass="ratingEmpty" FilledStarCssClass="ratingFilled">
如何在jav中访问这些控件后更新ascript。
also how can i update after accessing these controls in javascript.
只需添加一个答案,将其从未答复列表中删除。
OP已通过替换<$ c来实现它$ c> Asp.Net 评级控制到他自己的自定义javaScript
评级控制。
好工作 @ rahul-4u ...
如果你可以发布你的步骤是什么接下来,这将是非常棒的。
相反,您还可以在此处添加提示/文章,以解释您是如何在javaScript
中完成的。
我可以在Google中找到许多文章来在jQuery / javaScript
中执行此操作。
如果可以的话,你还可以发一篇关于你的经历的提示/文章。
Just adding an answer to remove this from Unanswered list.
OP has implemented it by replacing theAsp.Net
rating control to his own customjavaScript
rating control.
Good work @rahul-4u...
If you can post what are the steps you followed, that will be awesome.
Instead you can also add a Tip/Article on this to explain how you did it injavaScript
.
I can find many articles in Google to do this injQuery/javaScript
.
Still you can post one Tip/Article about your experience, if you can.
这篇关于ajax中的asp评级控制更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文