Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. ASP.NET 4.0 2 repeater Control problem

ASP.NET 4.0 2 repeater Control problem

Scheduled Pinned Locked Moved ASP.NET
csharpjavajavascriptasp-nettools
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    VishwaKL
    wrote on last edited by
    #1

    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

    S 1 Reply Last reply
    0
    • V VishwaKL

      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

      S Offline
      S Offline
      Sandeep Mewara
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups