Products

Solutions

Resources

Partners

Community

About

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...ScrollTopScrollTop
Previous
 
Next
New Post
9/10/2018 8:56 AM
 

Hello guys, first, sorry for my level in English

I've got a problem with the scrolltop positionning, I created a ASP.Net Module and when I pass from a panel with a certain heigt to an other one with with a higher height, DNN keep the scrollTop value, I searched and tried some ideas but nothing then if someone has a solution or a lead I am interested. I would like I could define the positioning of the scroll in the ascx.cs of my module if it's possible, because sometimes I have to be below then after a change panel at the top...

I saw differents parts where the scroll seems to be used.

My version of DNN is maybe old but I can't change, his version is : 06.02.06 (10) with DNN Community Edition.

 
New Post
9/10/2018 1:29 PM
 

I found the solution between the time I writed this post and the time it was published.

When I hide a panel for show an other one I did : 

 

 

 

 

  
  HtmlInputHidden hiddenScrollTop = (HtmlInputHidden)this.Page.FindControl("ScrollTop");
  hiddenScrollTop.Value = "0";

 

 

 

When my page refresh I'm at the top of the page.



 

For scroll to the bottom of my page, I did :

- In front

 

 

  
  <script type="text/javascript">
      function pageLoad(sender, args) {
          $(document).ready(function () {
              window.  = getHeight();
              function getHeight() {
                 var body = document.body,                      html = document.documentElement;                  var height = Math.max(body.scrollHeight, body.offsetHeight,                      html.clientHeight, html.scrollHeight, html.offsetHeight);                  $("#<%=height.ClientID%>").val(height);              }
          });
      }
  </script>

  <asp:HiddenField ID="height" runat="server" />

 

 

- In back

 

  
  HtmlInputHidden hiddenScrollTop = (HtmlInputHidden)this.Page.FindControl("ScrollTop");
  hiddenScrollTop.Value = height.Value;

 



 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...ScrollTopScrollTop


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out