posted 1/22/2009 by Vijendra Shakya
In ASP.NET's Ajax Rating control there is a bug. When user click on the rating control it Jumps on the top of the page because it add # with url. If you put your rating control on the bottom of the page and you click on the rating control it jumps on the top of the page.This happens because your all image tag are in HTML's Anchor <a> tag and its href attribute set to #(view page source of ajax rating control). To remove this problem you need to add following line on the page load.
protected void Page_Load(object sender, EventArgs e) { Ratingcontrol.Attributes.Add("Onclick", "return false;"); }
This will create java script dynamically for onclick event. That java script will override that unwanted jump to top of page.
What kind of email newsletter would you prefer to receive from CodeAsp.Net?18