ASP.NET 4.0 2 repeater Control problem
-
Hi guys, I have 2 repeater controls in the same page, i have to maintain the scroll position for the both repeater control on page auto post back. I am using java script but it work for 1 repeater control even though i called for both not the other
<script type="text/javascript">
window.onload = function () {
var strCook = document.cookie;
if (strCook.indexOf("!~") != 0) {
var intS = strCook.indexOf("!~");
var intE = strCook.indexOf("~!");
var strPos = strCook.substring(intS + 2, intE);
document.getElementById("dvGridview").scrollTop = strPos;
}
}
function SetDivPosition() {
var intY = document.getElementById("dvGridview").scrollTop;
document.cookie = "yPos=!~" + intY + "~!";
}
</script>Thanks and regards Vishwa
-
Hi guys, I have 2 repeater controls in the same page, i have to maintain the scroll position for the both repeater control on page auto post back. I am using java script but it work for 1 repeater control even though i called for both not the other
<script type="text/javascript">
window.onload = function () {
var strCook = document.cookie;
if (strCook.indexOf("!~") != 0) {
var intS = strCook.indexOf("!~");
var intE = strCook.indexOf("~!");
var strPos = strCook.substring(intS + 2, intE);
document.getElementById("dvGridview").scrollTop = strPos;
}
}
function SetDivPosition() {
var intY = document.getElementById("dvGridview").scrollTop;
document.cookie = "yPos=!~" + intY + "~!";
}
</script>Thanks and regards Vishwa
VishwaKL wrote:
document.getElementById("dvGridview").scrollTop = strPos;
I see call to only one. Where is both? Set scroll position for both control.
Sandeep Mewara Microsoft ASP.NET MVP 2012 & 2013 [My Blog] [My Latest Post]: How to extend a WPF Textbox to Custom Picker