I am using Server Side code to do Paging on SharePoint List. I am using Visual Web Part to show items from List.
protected void Page_Load(object sender, EventArgs e)
{
if (!this.Page.IsPostBack)
{
// below function loads data from sharepoint list. Not showing whole logic as its not required
LoadDataFromSharepointList();
}
}
When I load data it loads whole Page. Is it possible to load only that Web Part instead of whole Page. Any examples?
Update1
I tried to use Ajax update panel in ascx file
<asp:updatepanel runat= "server>
<div>
<section id="ideas" class="container">
<div>
<div>
<a href="#" role="button" id="btnShow" runat="server" OnServerClick="btnShow_Click">Get data</a>
</div>
</div>
</section>
But in my code behind i cannot get divTest
and it throws compile time error. Whats wrong in this?
asp:panel
is notUpdatePanel
. Second to access control from server side you need to markrunat="server"