---
title: "Update panel asp.net - page refresh"  
description: "Update panel asp.net - page refresh"  
author: "Anonymous User"  
published: 2014-12-05  
updated: 2014-12-05  
canonical: https://www.mindstick.com/forum/12747/update-panel-asp-dot-net-page-refresh  
category: "asp.net"  
tags: ["page lifecycle"]  
reading_time: 2 minutes  

---

# Update panel asp.net - page refresh

**[Code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii):**

```
<asp:Content ID="Content2" ContentPlaceHolderID="page_content_cp" Runat="Server"><asp:UpdatePanel runat="server" ID="UP1" UpdateMode="Conditional"><ContentTemplate><section id="page_section"><div class="data_top"><ul class="bxslider">    <asp:ListView ID="LV_slider" runat="server" DataSourceID="**">    <ItemTemplate>    <li>    <asp:Image ID="Image11" ImageUrl='<%#XPath("big_image_url") %>' AlternateText="slider"  runat="server"  />    </li>    </ItemTemplate>    </asp:ListView> </ul></div><div class="shaddow"></div><div class="data_bottom"><asp:ListView runat="server" ID="LV_data_bottom" DataSourceID="**"> <ItemTemplate><div style="display:inline;"><asp:LinkButton runat="server" CommandArgument='<%#XPath("big_image_url") %>' ID="LB_thumb" OnClick="lb_thumb1" ><asp:Image runat="server" ID="IMG_img1" ImageUrl='<%#XPath("small_image_url") %>' /><asp:Label runat="server" CssClass="title" ID="bottom_label" Text='<%#XPath("title") %>'></asp:Label></asp:LinkButton></div> </ItemTemplate></asp:ListView></div>  </section></ContentTemplate></asp:UpdatePanel>         <asp:XmlDataSource ID="**" runat="server"             DataFile="~/***/***" XPath="/Data/**/**">        </asp:XmlDataSource> </asp:Content>
```

[Click](https://www.mindstick.com/articles/12423/social-login-magento-2-one-click-to-register-social) on the thumbs "jump" the [page](https://www.mindstick.com/articles/13031/why-to-make-a-wikipedia-page).

I dont want the page will "jump"/"[refresh](https://www.mindstick.com/forum/12865/how-to-refresh-dropdownlist-but-keep-old-selected-value-json)" after click on thumb. how can i do that? Maybe i [wrong](https://answers.mindstick.com/qa/48468/who-wrote-the-the-wrong-enemy-america-in-afghanistan-2001-2014-and-when) on the place of the [updatepanel](https://www.mindstick.com/articles/151/asp-dot-net-ajax-server-control-updateprogress-updatepanel) ?

## Replies

### Reply by Anonymous User

Put ScriptManager.

```
<asp:ScriptManager EnablePartialRendering="true"  ID="ScriptManager1" runat="server"></asp:ScriptManager><asp:Content ID="Content2" ContentPlaceHolderID="page_content_cp" Runat="Server"><asp:UpdatePanel runat="server" ID="UP1" UpdateMode="Conditional">
```

### Reply by Anonymous User

You can always get it done using updatepanel and microsoft ajax... but there is a better and more lightweight alternative. Use jquery to swap the main image on top when the thumbnails are clicked, without doing a page refresh.

Define a surrounding div for the imain image with id "imageBox"

```
<a href="#" id="changeImage" rel="1"><img class="thumb" src="image1_thumb.jpg" /></a><div id="imageBox">&nbsp;</div>then, $(document).ready(function(){    $('#changeImage').click(function(){        var rel = $(this).attr('rel');        $("#imageBox").html("<img src='image" + rel + ".jpg' />");    })});
```

This is both clean and lightweight. no Microsoft ajax panel junk.


---

Original Source: https://www.mindstick.com/forum/12747/update-panel-asp-dot-net-page-refresh

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
