Page still refreshes after wrapping the repeater in an update panel

I've two SqlDataSources and two Repeaters, each repeater contains one hyperlink (i also tried using web server button and anchors).

The hyperlinks fetch from the database some values and in the NavigationUrl property I use a string.Format method to create a parameterized url, to pass for the browser, then second repeater is populated according to the value passed in the url which is originally passed by the first repeater's hyperlink

this is my sample code :

<asp:ScriptManager id="Scrptmanagr"  runat="server"></asp:ScriptManager>
<asp:UpdatePanel id="updtpanl" runat="server">
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:testConnectionString %>" 
            SelectCommand="SELECT [arrange_by_id], [arrange_by] FROM [arrange_by]">
        <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1">
                <asp:HyperLink ID="HyperLink3" NavigateUrl='<%# string.Format("{0}?SortingType={1}",Request.AppRelativeCurrentExecutionFilePath, Eval("arrange_by_id"))%>' runat="server"><%# Eval("arrange_by") %></asp:HyperLink>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:testConnectionString %>" 
            SelectCommand="SELECT [alphabet_id],[arrange_by_id], [value] FROM [alphabet] WHERE ([arrange_by_id] = @arrange_by_id)">
                <asp:QueryStringParameter Name="arrange_by_id" QueryStringField="SortingType" Type="Int32" DefaultValue="1" />
        <br /><br />
        <asp:Repeater ID="Repeater2" runat="server" DataSourceID="SqlDataSource2">
                <asp:HyperLink  ID="hyper1" runat="server" NavigateUrl='<%#string.Format("{0}?SortingType={1}&SortBy={2}",Request.AppRelativeCurrentExecutionFilePath, Eval("arrange_by_id"),Eval("value"))%>'><%# Eval("value")%></asp:HyperLink>

Now! everytime I click any of the hyperlinks it causes a full post back and refreshes the page! Am I missing something ?


Pretty sure an <asp:HyperLink> isn't going to get you a partial update, it renders to HTML as an <a href=".."> tag. You'll need a control that actually causes a postback, an <asp:Button> or <asp:LinkButton>.

Need Your Help

How do I use an existing sqlite database in my Windows Phone 8 app

sqlite windows-phone windows-phone-8 sqlite-net

I have a database from an existing android app that I need to import into my Windows Phone 8 app. Is the only way to do this to create some huge population script to be ran on the first loading of ...

Preventing bad data input

database postgresql web-applications

Is it good practice to delegate data validation entirely to the database engine constraints?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.