Hi,

I have a problem with a scrollbar, once in a while when I try scrolling up or down it jumps to the recent position of the scroll.

You can see the problem on: http://radiojazz.dk/udsendelser.aspx

And then try to scroll abit and see that it jumps.

Does anybody know how to fix this problem?

I hope you understand what I meen

thanks

Recommended Answers

All 10 Replies

remove update panels then try again.

Hi, witch update panels, I don't think I have any?

that problem occurs in ajax enabled websites as far as i experienced.

Ok, but do you know how I fix the problem then?

And I don't know if I made the website Ajax Enabled or what.

How do I fix that?

Thx

why dont you post mark up of your web page? it is hard to infer something without seeing it.

Ok here is the code from the masterpage:

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">


    <title>Radio Jazz</title>
    <link href="style.css" rel="stylesheet" type="text/css" />
    <asp:ContentPlaceHolder id="head" runat="server">
    </asp:ContentPlaceHolder>
</head>

<body>

<div class="container">
    <form id="form1" runat="server">
   
  <a href="Default.aspx"> <div class="top"></div></a>
   
      
        
        
  
    <span class="menu"><a href="default.aspx">Forside</a></span>
    <span class="menu"><a href="udsendelser.aspx">Udsendelser</a></span>
    <span class="menu"><a href="http://83.133.64.106:8000/listen.pls">Netradio</a></span>
    <span class="menu"><a href="venner.aspx">Radio Jazz Venner</a></span>
    <span class="menu"><a href="omradiojazz.aspx">Om Radio Jazz</a></span>    
    <span class="menu"><a href="links.aspx">Links</a></span>
    
    
    <span class="dato_master">

<asp:Label ID="date" runat="server" Text="Label"></asp:Label> 


</span>
    <span class="ur">

  <asp:Label ID="lblcurrenttime" runat="server" Text=""></asp:Label>
        </span>
   
    
        
        
        
    

    
   
    <asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Timer ID="Timer1" runat="server" Interval="1000">
</asp:Timer>
 





</ContentTemplate>

</asp:UpdatePanel>
    
        


  
         
         <div class="Content"> </div>
          
   
    <div id="content" style="font-size: 75%"> 
    <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
        </asp:ContentPlaceHolder>
        
      </div>


          
    
    
   
    </form>
    </div>
</body>


</html>

and from one of the page where the scroll bar doesn't work properly:

aspx page:

<%@ Page Title="" Language="C#" Debug="true" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="udsendelser.aspx.cs" Inherits="udsendelser" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

    <asp:Repeater ID="program" runat="server">
    
    <ItemTemplate>
    <div class="container_udsendelser">
    <div class="container_udsendelser_txt">
       <div class="dato_udsendelser">  <%# Eval("date", "{0:d}")%></div>
       
       <span class="program_txt">
       <%# Eval("tid", "{0:t}")%>
       </span>
      
      <span class="txt_udsendelser"> <%# Eval("txt")%></span> 
      
         
                      <span class="link_udsendelser">
                      
                      <%#
(Eval("titel").ToString().Length > 0) ? "<a href=\"viewpage.aspx?task=edit&id=" + Eval ("id").ToString() + "\">Læs mere...</a>" : ""
%>
      </span>
      
      
      
        
     
      
     
         </div>
    </div>
   <br />

                
     <!--<a href="viewpage.aspx?task=edit&id=<%# Eval ("id") %>">Læs mere...</a>-->
 
      
    </ItemTemplate>
    </asp:Repeater>
    
    

</asp:Content>

cs page:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web.Security;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class udsendelser : System.Web.UI.Page
{
    SqlConnection objconn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ToString());
    SqlCommand objcmd = new SqlCommand();
    protected void Page_Load(object sender, EventArgs e)
    {


        GetLinks();

        if (Request.QueryString["task"] != null)
        {

            switch (Request.QueryString["task"].ToString())
            {
                case "edit":
                    //do
                    break;
            }


        }
    }


    private void GetLinks()
    {

        if (DateTime.Now.Hour > 3)
        {


            objcmd.Connection = objconn;
            objcmd.CommandType = CommandType.Text;
            objcmd.CommandText = "SELECT * FROM PROGRAM WHERE DATE >= convert(varchar, GETDATE()) AND DATE <= DATEADD(Month, 2, GETDATE()) ORDER BY date,tid ASC";



            SqlDataReader reader = null;

            objconn.Open();

            reader = objcmd.ExecuteReader();
            program.DataSource = reader;
            program.DataBind();

            objconn.Close();
        }


        else
        {

            objcmd.Connection = objconn;
            objcmd.CommandType = CommandType.Text;
            objcmd.CommandText = "SELECT * FROM PROGRAM WHERE (DATE >= convert(varchar, GETDATE()) OR (DATE <= DATEADD(Month, 2, GETDATE())) AND DATE = DATEADD(day, DATEDIFF(day, 0, GETDATE()), 0)) ORDER BY date,tid ASC";

            SqlDataReader reader = null;

            objconn.Open();

            reader = objcmd.ExecuteReader();
            program.DataSource = reader;
            program.DataBind();

        }
    }
}

and the stylesheet page:

*{margin:0; padding:0;}

body {
	font-family:Verdana, Arial sans-serif; font-size:14px; color:#fff;
	background-color: #000000;
}

p
{ 
line-height: 1;
}
.container
{
    width:900px;
    margin-left:180px;
}

.container_udsendelser
{
    width:900px;

}
	
.top
{

   background-image:url(assets/header.jpg);
   width:900px;
   height:179px;

}	

.menu {	font-family:Verdana, Arial, sans-serif; font-size:12px; color:#9999CC; margin: 0px 20px 0px 0px;}
.menu a:link {color:#9999CC; text-decoration:none;}
.menu a:visited {color:#9999CC; text-decoration:none;}
.menu a:hover {color:#DA0013; text-decoration:none;}
.menu a:mouseover {color:#DA0013; text-decoration:none;}
.menu a:active {color:#DA0013; text-decoration:none;}	

	
.Content {	font-family:Verdana, Arial, sans-serif; font-size:14px; color:#fff; margin: 70px 0px 0px 0px;}	
.Content a:link {color:#DA0013; text-decoration:none;}
.Content a:visited {color:#DA0013; text-decoration:none;}
.Content a:hover {color:#fff; text-decoration:none;}
.Content a:mouseover {color:#fff; text-decoration:none;}
.Content a:active {color:#DA0013; text-decoration:none;}

.link_tekniker
{
    color:#ffffff;
    font-size:15px;
}

.link_tekniker a:link {color:#ffffff; text-decoration:none;}
.link_tekniker a:visited {color:#ffffff; text-decoration:none;}
.link_tekniker a:hover {color:#DA0013; text-decoration:none;}
.link_tekniker a:mouseover {color:#ffffff; text-decoration:none;}
.link_tekniker a:active {color:#ffffff; text-decoration:none;}	

h4
{
    color:#9999CC;
    font-weight:normal;
}


fieldset
{
    width:300px;
    margin-top:10px;
    float:left;
    margin-right:100px;
}

.program_txt
{

    font-size:15px;
    color:#9999CC;
    width:150px;
    float:left;
    
}

.top_om
{
    float:left;
    font-size:15px;
    color:#9999CC;
    width:900px;
    height:150px;
}



.blaa_storre_link {	font-family:Verdana, Arial, sans-serif; font-size:15px; color:#9999CC; margin-bottom:500px; margin: 0px 0px 0px 0px;}
.blaa_storre_link a:link {color:#9999CC; text-decoration:none;}
.blaa_storre_link a:visited {color:#9999CC; text-decoration:none;}
.blaa_storre_link a:hover {color:#DA0013; text-decoration:none;}
.blaa_storre_link a:mouseover {color:#DA0013; text-decoration:none;}
.blaa_storre_link a:active {color:#DA0013; text-decoration:none;}	


#program_txt_vert
{

    font-size:15px;
    color:#fff; 
    width:500px;
    float:right;

    
}

#program_txt_tekniker
{

    font-size:15px;
    color:#fff; 
    width:300px;
    float:left;
    
}

#view_img
{
    float:left;
    padding-right:15px;
}



.ur
{
    color:#ff0000;   

}



.txt_udsendelser
{

    font-size:15px;
    color:#ffffff;
}

.bund_txt_om
{

    font-size:15px;
    color:#ffffff;
    margin-top:140px;
    
    
}

.txt_redaktion
{
   
    font-size:15px;
    color:#fff;
    
    
}

.top_om_hojre
{
    position:relative;
    left:450px;
    top:-140px;
    width:300px;

}



.linkside {	font-family:Verdana, Arial, sans-serif; font-size:15px; color:#ffffff; margin-left:70px;}
.linkside a:link {color:#ffffff; text-decoration:none;}
.linkside a:visited {color:#ffffff; text-decoration:none;}
.linkside a:hover {color:#DA0013; text-decoration:none;}
.linkside a:mouseover {color:#ffffff; text-decoration:none;}
.linkside a:active {color:#ffffff; text-decoration:none;}	


.link_venner {	font-family:Verdana, Arial, sans-serif; font-size:15px; color:#9999CC; margin-left:300px;}
.link_venner a:link {color:#9999CC; text-decoration:none;}
.link_venner a:visited {color:#9999CC; text-decoration:none;}
.link_venner a:hover {color:#DA0013; text-decoration:none;}
.link_venner a:mouseover {color:#9999CC; text-decoration:none;}
.link_venner a:active {color:#9999CC; text-decoration:none;}	

.container_udsendelser_txt
{
    margin-left:70px;
}

.link_udsendelser
{
    font-family:Verdana, Arial, sans-serif; 
    font-size:12px; 
    color:#ff0000; 

}
.link_udsendelser a:link {color:#ff0000; text-decoration:none;}
.link_udsendelser a:visited {color:#ff0000; text-decoration:none;}
.link_udsendelser a:hover {color:#ff0000; text-decoration:none;}
.link_udsendelser a:mouseover {color:#ff0000; text-decoration:none;}
.link_udsendelser a:active {color:#ff0000; text-decoration:none;}	

.dato_udsendelser
{
    font-size:10px;
    font-weight:bold;
   width:100px;
}	

legend
{
    color:#ffffff;
}



.dato_master
{
    text-align:right;
    color:#9999CC;
    margin-left:152px;
    
}

.rediger_links
{
    color:#ffff00;
}



#view_titel
{
    float:left;
    width:400px;
    font-size:15px;
    color:#ffffff;
}

.linjeafstand
{
    line-height:20px;
}

I hope you can find the error.

Thx

you said you dont have update panels, i see that you have update panels and script managers on your page. as i said this problem is caused by that update panels. if it is not necessary to have them on your page, let the page post back to the server.

Yeah sorry, I also saw it after I had written to you.

But now it works, because I deleted my update panels.
I thought I needed them to get the clock to work, but I guess not. :-D

Thx

where is my reputation ?:)

commented: Here. -4
commented: Serkan, asking for money, gifts, reputation points for helping is wrong. 'Where is my reputation ?' is simply not the right way, don't you think ? -2

Ok now I gave you reputation, I think. I didn't know how, but I think I did it right :-D

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.