Custom validator scrolls page to the top in ASP.NET
If we add a ValidationSummary control to the page, its ValidationSummaryOnSubmit function invokes “window.scrollTo(0,0)” when page is invalid. That’s why the page scrolls to the top.To workaround this issue, we can assign a function to window.scrollTo which do nothing, so that window.scrollTo(0,0) will not take effect. This workaround is appropriate for the pages which...