0

Hi
I use dropdown list box in my asp page...
I set the autopodtBack property in that dropdown box true..
at the run time i select some item in that dropdown list box , then page is go to top ..I want stop this... please help me
thank you
Chamith saranga

4
Contributors
10
Replies
11
Views
7 Years
Discussion Span
Last Post by dnanetwork
0
<asp:DropDownList ID="ddType" runat="server" AutoPostBack="True"  Width="128px" TabIndex="2" ValidationGroup="A" CssClass="select1bold" OnSelectedIndexChanged="ddType_SelectedIndexChanged" >
                           <asp:ListItem Value="0">1</asp:ListItem>
                           <asp:ListItem Value="1">2</asp:ListItem> 
                           <asp:ListItem Value="2">3</asp:ListItem>
                       </asp:DropDownList>

in this dropdown list box, the property of

AutoPostBack="True"

..In that case when we select some item from dropdown,
the asp page is refresh & goes top of the page....the page refresh is not a problem...My problem is how stop page goes top...
thank U...Chamith saranga

0

we think long asp page...it has scorel bar...In that case we set dropdown list box bottom of the page....in that dropdown list box AutoPostBack="True"....when we select some item from that Dropdown list box page was goes up...i must stop that...
thanks "adatapost" help to me

0

you can use UpdatePanel for Ajax Control to Avoid this.....

Like

<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
                    <ContentTemplate>
                        <asp:DropDownList id="ddlNo" runat="server" AutoPostBack="true">
                                      <asp:ListItem Value="1" Text="1"></asp:ListItem>
                            <asp:ListItem Value="2" Text="2"></asp:ListItem>
                            <asp:ListItem Value="3" Text="3"></asp:ListItem>
                        </asp:DropDownList>
                    </ContentTemplate>
                    </asp:UpdatePanel>

i think this help?

Edited by __avd: Added [code] tags. For easy readability, always wrap programming code within posts in [code] (code blocks).

0

there is a option in page ...which maintains your scroll position..

try that..

i guess you are using some Telerik / Ajax control...which causes this problem...

0
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="myAds1.aspx.cs" Inherits="myAds1" [B]MaintainScrollPositionOnPostback="true"[/B] %>
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.