Rating投票控件点击后页面上跳的问题的解决
To: "fhmsha@163.com" <fhmsha@163.com>
Date: Sun, 29 Jul 2007 02:55:15 +0800 (CST)
Subject: Re: Bug in Toolkit's rating control
writer.AddAttribute("href", "#");
writer.AddAttribute("onclick", "return false;");
writer.AddAttribute("style", "text-decoration:none");
i have no time to deal with that yet,but i can give you something:
in the link;http://www.youtube.com/watch?v=rp2hQd7mRS0
the Code of Rating is:<a href="#" onclick="ratingComponent.setStars(1); return false;" onmouseover="ratingComponent.showStars(1);" onmouseout="ratingComponent.clearStars();"><img src="/img/icn_star_empty_19x20.gif" id="star__1" class="rating" style="border: 0px"></a>
and in ASP.NET AJAX's Rating, http://asp.net/AJAX/Control-Toolkit/Live/Rating/Rating.aspx
the Code of Rating is:<a href="#" id="ctl00_SampleContent_ThaiRating_A" title="2" style="text-decoration:none"><span id="ctl00_SampleContent_ThaiRating_Star_1" class="ratingStar filledRatingStar" style="float:left;"> </span><span id="ctl00_SampleContent_ThaiRating_Star_2" class="ratingStar filledRatingStar" style="float:left;"> </span><span id="ctl00_SampleContent_ThaiRating_Star_3" class="ratingStar emptyRatingStar" style="float:left;"> </span><span id="ctl00_SampleContent_ThaiRating_Star_4" class="ratingStar emptyRatingStar" style="float:left;"> </span><span id="ctl00_SampleContent_ThaiRating_Star_5" class="ratingStar emptyRatingStar" style="float:left;"> </span></a>
you can compare these codes and you will find that:the ASP.NET AJAX's code miss the "return false;" in "onclick" event.
so you can modify the source code of ASP.NET AJAX,or just wait...if i have good news i will tell you.
hope it can help you
thanks
fhmsha
From: mpj.vervoort
To: fhmsha@163.com
Date: Sat, 28 Jul 2007 03:31:06 +0800 (CST)
Subject: [博客园留言通知]Bug in Toolkit's rating control(来自Marco Vervoort)
Hi,
I saw you wrote on Scot's blog a reply with:
there is something NOT good for UI with Rating Control.
the control of this release add a tag "<a href=#></a>".
when i click the star to rate,if i stay in the bottom of the page,the page will go to the top.i think it is realy bad.
I'm having the same problem. Do you perhaps have a solution to the problem? I'm planning to implement it on my personal self written blog: www.kobuz.net (sorry its in Dutch)
Regards,
Marco Vervoort
发送者:Marco Vervoort
Email:mpj.vervoort
发送时间:2007-07-28 03:31
消息来自: http://www.cnblogs.com/fhmsha/
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· 分享 3 个 .NET 开源的文件压缩处理库,助力快速实现文件压缩解压功能!
· Ollama——大语言模型本地部署的极速利器
· [AI/GPT/综述] AI Agent的设计模式综述