Я использую 3 таймера по 1000 мс, 500 мс, 3000 мс с несколькими панелями обновления на одной странице, но при запуске в реальном проекте страница автоматически продолжает прокручиваться вверх и вниз. При запуске на локальном хосте также возникает та же проблема с незначительным эффектом. Кто-нибудь может объяснить, почему и как решить?
Я также поместил
<pages smartNavigation="true" maintainScrollPositionOnPostBack="true"></pages>
в мой файл webconfig
вот мой код
<div class="card-heading">
<h2 class="teamProfile100-form-title">Auction Arena</h2>
<asp:UpdatePanel ID="upSpectatorsCount" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Timer ID="tmSpectatorsCount" runat="server" Interval="1000" OnTick="tmSpectatorsCount_Tick"></asp:Timer>
<div style="float: right; background-color: white" class="oval">
<p style="padding-top: 5px">
<i class="far fa-eye"></i>
<asp:Label ID="lblSpectatorsCount" runat="server" EnableViewState="false" Font-Italic="true" Font-Size="Small"></asp:Label>
</p>
</div>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="tmSpectatorsCount" EventName="Tick" />
</Triggers>
</asp:UpdatePanel>
</div>
<asp:UpdatePanel ID="upError" runat="server" UpdateMode="Always">
<ContentTemplate>
<asp:Label ID="lblErrorMessage" runat="server" EnableViewState="false" ForeColor="Red" CssClass="name"></asp:Label>
</ContentTemplate>
</asp:UpdatePanel>
<asp:Timer ID="tm1000ms" runat="server" Interval="1000" OnTick="tm1000ms_Tick"></asp:Timer>
<asp:Timer ID="tm3000ms" runat="server" Interval="3000" OnTick="tm3000ms_Tick"></asp:Timer>
<asp:Timer ID="tm500ms" runat="server" Interval="500" OnTick="tm500ms_Tick"></asp:Timer>
<%-- Display Timer for Auction --%>
<div class="row">
<div class="col-md-5"></div>
<div class="col-md-2" style="float: left">
<div class="squareBOX" id="timerblock">
<asp:UpdatePanel ID="upTimerAuction" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<%--<asp:Timer ID="timerAuction" runat="server" Interval="1000" OnTick="timerAuction_Tick"></asp:Timer>--%>
<i class="far fa-stopwatch"></i>
<asp:Literal ID="litTimer" runat="server"></asp:Literal>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="tm1000ms" EventName="Tick" />
</Triggers>
</asp:UpdatePanel>
</div>
</div>
<div class="col-md-5">
</div>
</div>
<div class="form-row" style="padding-top: 5px">
<%-- Display Total Team budget --%>
<div class="col-md-3" style="padding-top: 101px">
<asp:UpdatePanel ID="upTeamBudget" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="rectangleBOXRigth" id="divTeamBudget" runat="server">
<p style="padding-top: 10px">
Budget LEFT
<asp:Label ID="lblTeamBudget" runat="server" CssClass="budgetStyle" EnableViewState="true"></asp:Label>
</p>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div class="col-md-1"></div>
<div class="col-md-4">
<asp:UpdatePanel ID="upPlayerCard" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<%--<asp:Timer ID="tmPlayerCard" runat="server" Interval="3000" OnTick="tmPlayerCard_Tick"></asp:Timer>--%>
<asp:Repeater ID="rpAuctionPlayer" runat="server" OnItemDataBound="rpAuctionPlayer_ItemDataBound">
<ItemTemplate>
<div class="cardM horizontal">
<div class="cardM-image">
<asp:Image ID="imgPlayerProfilePic" runat="server" ImageUrl='<%#Eval("PlayerProfilePic") %>' CssClass="img-fluid rounded" />
<asp:HiddenField ID="hfPlayerID" runat="server" Value='<%#Eval("PlayerID") %>' EnableViewState="false" />
<table>
<tr>
<td style="font-weight: bold">
<p>
<asp:Literal ID="litPlayerName" runat="server" EnableViewState="false" Text="Name"></asp:Literal>
</p>
</td>
<td></td>
<td>
<p>
<asp:Label ID="lblPlayerName" runat="server" EnableViewState="false" Font-Bold="true" Text='<%# Eval("PlayerName") %>'></asp:Label>
</p>
</td>
</tr>
.......</table>
</div>
</div>
<div class="cardM-action">
<asp:HyperLink ID="hlBIO" runat="server" NavigateUrl="#" onclick="Bio()">Bio</asp:HyperLink>
<asp:HyperLink ID="hlBAT" runat="server" NavigateUrl="#" onclick="Bat()">Bat</asp:HyperLink>
<asp:HyperLink ID="hlBOWL" runat="server" NavigateUrl="#" onclick="Bowl()">Bowl</asp:HyperLink>
</div>
</div>
</div>
</ItemTemplate>
</asp:Repeater>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="tm3000ms" EventName="Tick" />
</Triggers>
</asp:UpdatePanel>
</div>
<div class="col-md-3" style="padding-top: 27px">
<div class="rectangleBOXLeft">
<asp:UpdatePanel ID="upBiddingTeam" runat="server" UpdateMode="Conditional" ViewStateMode="Enabled">
<ContentTemplate>
<%--<asp:Timer ID="tmBiddingCount" runat="server" Interval="500" OnTick="tmBiddingCount_Tick"></asp:Timer>--%>
<p style="text-align: center">
Total team count :
<asp:Label ID="lblBiddingTeamCount" runat="server" EnableViewState="false"></asp:Label>
</p>
<asp:Repeater ID="rpBiddingTeam" runat="server">
<ItemTemplate>
<div class="form-row">
<div class="col-md-3"></div>
<div class="col-md-2">
<asp:Image ID="imgTeamLogo" Height="36px" Width="36px" runat="server" CssClass="img-fluid rounded-circle" ImageUrl='<%#Eval("TeamLogo") %>' />
</div>
<div class="col-md-2">
<p>
<asp:Label ID="lblTeamName" runat="server" EnableViewState="false" Text='<%#Eval("TeamName") %>'></asp:Label>
</p>
</div>
<div class="col-md-2">
<p>
<asp:Label ID="lblTeamBidAmount" runat="server" EnableViewState="false" Text='<%#Eval("CurrentBidAmount") %>'></asp:Label>
</p>
</div>
<div class="col-md-3"></div>
</div>
</ItemTemplate>
</asp:Repeater>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="tm500ms" EventName="Tick" />
</Triggers>
</asp:UpdatePanel>
</div>
</div>
</div>
<div class="form-row">
<div class="col-md-5"></div>
<%-- Display Bid Amount --%>
<div class="col-md-2" style="text-align: center">
<asp:UpdatePanel ID="upCurrentBid" runat="server" UpdateMode="Always">
<ContentTemplate>
<%--<asp:Timer ID="tmCurrentBid" runat="server" Interval="1000" OnTick="tmCurrentBid_Tick"></asp:Timer>--%>
<div class="squareBOX" style="width: 135px; background-color: white; padding: 3px 2px">
<p>
<asp:Label ID="lblBidName" runat="server" EnableViewState="true"></asp:Label>
</p>
<i class="fal fa-rupee-sign"></i>
<asp:Label ID="lblCurrentBid" runat="server" Font-Names="Poppins-Regular" Font-Size="19px" EnableViewState="true">
</asp:Label>
</div>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="tm1000ms" EventName="Tick" />
</Triggers>
</asp:UpdatePanel>
</div>
<div class="col-md-2"></div>
<%-- Display Team Player List --%>
<div class="col-md-3" style="padding-top: 10px">
<div class="rectangleBOXLeft" id="divTeamPlayerList" runat="server">
<asp:UpdatePanel ID="upTeamList" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<%--<asp:Timer ID="tmTeamList" runat="server" Interval="3000" OnTick="tmTeamList_Tick"></asp:Timer>--%>
<div class="HeaderBottom">
<div style="border-right: 3px solid #d9d9d9; display: inline-block">
<p style="padding-right: 7px">
<asp:Label ID="lblTeamNameHeader" runat="server" EnableViewState="false"></asp:Label>
</p>
</div>
<div style="display: inline-block">
<p style="padding-left: 5px">
Players <asp:Label ID="lblTotalPlayerCount" runat="server" EnableViewState="false"></asp:Label>
/ 25
</p>
</div>
</div>
<asp:Panel ID="pnTeamInfoList" runat="server" ScrollBars="Vertical" Height="130px">
<asp:Repeater ID="rpTeamInfoList" runat="server">
<ItemTemplate>
<div class="form-row" style="text-align: center">
<div class="col-md-4">
<asp:Image ID="imgPlayerLogoList" Height="36px" Width="36px" runat="server" CssClass="img-fluid rounded-circle" ImageUrl='<%#Eval("PlayerProfilePic") %>' />
</div>
<div class="col-md-4">
<p>
<asp:Label ID="lblPlayerNameList" runat="server" EnableViewState="false" Text='<%#Eval("PlayerName") %>'></asp:Label>
</p>
</div>
<div class="col-md-4">
<p>
<asp:Label ID="lblPlayerBidAmountList" runat="server" EnableViewState="false" Text='<%#Eval("PlayerSoldPrice") %>'></asp:Label>
</p>
</div>
</div>
</ItemTemplate>
</asp:Repeater>
</asp:Panel>
<div class="FooterBottom">
<div style="border-right: 3px solid #d9d9d9; display: inline-block">
<r style="padding-right: 5px">
Overseas <asp:Label ID="lblTotalOverseas" runat="server"></asp:Label> / 8
</r>
</div>
<div style="float: right; display: inline-block; padding-right: 10px">
<r style="padding-right: 5px">
Indian <asp:Label ID="lblTotalIndian" runat="server"></asp:Label> / 17
</r>
</div>
</div>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="tm3000ms" EventName="Tick" />
</Triggers>
</asp:UpdatePanel>
</div>
</div>
</div>