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

Recommended Answers

Show your code please.

Jump to Post

Can you explain? - My problem is how stop page goes top...

Jump to Post

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?

Jump to Post

All 10 Replies

Show your code please.

<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

Can you explain? - My problem is how stop page goes top...

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

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?

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...

thank u very mutch to all of you.
I sole my problem :-)

wot options did u try..?

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="myAds1.aspx.cs" Inherits="myAds1" [B]MaintainScrollPositionOnPostback="true"[/B] %>

oh yeah :)

Be a part of the DaniWeb community

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