none
Update Panel in web part RRS feed

  • Question

  • Hi,

    I have placed web update panel ( asp ) in web part ( sharepoint 2013 ) and place all control in like ( repeater others )

    Problem:

    its not reloading or refreshing data in repeater.

    Activity i have done IS :

    my script manager is on master page and update panel is on webpart with UpdateProgress..

    why its not refreshing data into repeater although its fetching data from sharepoint list but not showing that data into repeater

    Kindly help me out

    Thanks

    Wednesday, March 22, 2017 7:30 AM

Answers

  • Hi,

    Please check the code below:

    <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
         <ContentTemplate>      
            <div id="divContent" style="height:150px; width:200px" runat="server">
                <table  style="width:100%" >
                <tr>
                    <td  style="width:10%" ></td>
                    <td  style="width:80%" >
                
                        <div class="smartspeak" style="padding-right: 20px; height:300px; width:280px;">
                            <asp:Repeater ID="rptsmartspeak" runat="server">
                            <ItemTemplate>
             
                                <h2 style="padding-top: 5px; font-weight: 700; font-size: 12px;">
                                    <%#DataBinder.Eval(Container.DataItem,"Title")%>
                                </h2>
                                <br />
                                <br />
                                <p  style="margin-top: -39px;">
                                <%#DataBinder.Eval(Container.DataItem,"Description")%>            
                                </p>
                                <hr />
                            </ItemTemplate>
                            </asp:Repeater>
                        </div>          
                    </td>
                    <td  style="width:10%" ></td>
                </tr>
                </table>
             </div>   
             <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Refresh" />     
        </ContentTemplate>
     </asp:UpdatePanel> 


            protected void Page_Load(object sender, EventArgs e)
            {
                if (!Page.IsPostBack)
                {
                    Bindspeaker();
                    Label1.Text = DateTime.Now.ToString();
                }
    
            }
    
            private void Bindspeaker()
            {
                using (SPSite site = new SPSite(SPContext.Current.Site.Url))
                {
                    using (SPWeb web = site.OpenWeb())
                    {
                        SPList list = web.Lists["CustomList18"];
                        if (list != null)
                        {
                            SPQuery query = new SPQuery();
                            query.Query = "<Where><Eq><FieldRef Name='Isactive' /><Value Type='Boolean'>1</Value></Eq></Where>";
                            SPListItemCollection collitem = list.GetItems(query);
    
                            rptsmartspeak.DataSource = collitem.GetDataTable();
                            rptsmartspeak.DataBind();
    
                        }
                    }
                }
            }
    
            protected void Button1_Click(object sender, EventArgs e)
            {
                Bindspeaker();
            }

    Best Regards,

    Dennis


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    • Marked as answer by qasimidl Thursday, March 30, 2017 11:12 AM
    • Unmarked as answer by qasimidl Thursday, March 30, 2017 11:12 AM
    • Marked as answer by qasimidl Thursday, March 30, 2017 11:12 AM
    • Unmarked as answer by qasimidl Thursday, March 30, 2017 11:12 AM
    • Marked as answer by qasimidl Friday, March 31, 2017 7:36 AM
    Wednesday, March 29, 2017 1:45 AM
    Moderator
  • Hi,

    Please try to replace

    <img src="../_layouts/15/images/loading2.gif" width="100px" />

    with

    <img src="/_layouts/15/images/loading16.gif" width="100px" />

    More information:

    3 Different Ways to Display Progress in an ASP.NET AJAX Application

    http://www.dotnetcurry.com/ShowArticle.aspx?ID=227

    Best Regards,

    Dennis


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    • Marked as answer by qasimidl Friday, March 31, 2017 7:36 AM
    Thursday, March 30, 2017 10:09 AM
    Moderator
  • Hi,

    Glad to hear that you solve this issue, thanks for your sharing.

    Best Regards,

    Dennis


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    • Marked as answer by qasimidl Thursday, April 6, 2017 9:45 AM
    Friday, March 31, 2017 8:22 AM
    Moderator

All replies

  • Hi,

    To use Update Panel in SharePoint, please check the article below:

    Using the AJAX Update Panel in SharePoint

    https://msdn.microsoft.com/en-us/library/ff650218.aspx

    Here is repeater web part for your reference:

    News Rollup.ascx

    <%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
    <%@ Assembly Name="Microsoft.Web.CommandUI, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
    <%@ Import Namespace="Microsoft.SharePoint" %>
    <%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="News Rollup.ascx.cs" Inherits="News.News_Rollup.News_Rollup" %>
    <div style="height:150px; width:200px" >
    <table  style="width:100%" >
    <tr>
    <td  style="width:10%" ></td>
    <td  style="width:80%" >
    <marquee  behavior="scroll" direction="up" scrollamount="3" onmouseover="stop();"  onmouseout="start()";>
    <div class="smartspeak" style="padding-right: 20px; height:300px; width:280px;">
    <asp:Repeater ID="rptsmartspeak" runat="server">
    <ItemTemplate>
    
    <%#DataBinder.Eval(Container.DataItem,"Date")%>
    <br />
    <h2 style="padding-top: 5px; font-weight: 700; font-size: 12px;"><%#DataBinder.Eval(Container.DataItem,"Title")%></h2>
    <br />
    <br />
    <p  style="margin-top: -39px;">
    <%#FormatDescription(Container.DataItem,"Description")%>
    
    </p>
    <hr />
    </ItemTemplate>
    </asp:Repeater>
    </div>
    </marquee>
    </td>
    <td  style="width:10%" ></td>
    
    </tr>
    </table>

    News Rollup.ascx.cs

    using Microsoft.SharePoint;
    using System;
    using System.ComponentModel;
    using System.Web.UI;
    using System.Web.UI.WebControls.WebParts;
    
    namespace News.News_Rollup
    {
    	[ToolboxItemAttribute(false)]
    	public partial class News_Rollup : WebPart
    	{
    		// Uncomment the following SecurityPermission attribute only when doing Performance Profiling on a farm solution
    		// using the Instrumentation method, and then remove the SecurityPermission attribute when the code is ready
    		// for production. Because the SecurityPermission attribute bypasses the security check for callers of
    		// your constructor, it's not recommended for production purposes.
    		// [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Assert, UnmanagedCode = true)]
    		public News_Rollup()
    		{
    		}
    
    		protected override void OnInit(EventArgs e)
    		{
    			base.OnInit(e);
    			InitializeControl();
    		}
    
    		protected void Page_Load(object sender, EventArgs e)
    		{
    			if (!Page.IsPostBack)
    			{
    				Bindspeaker();
    			}
    		}
    		private void Bindspeaker()
    		{
    			using (SPSite site = new SPSite(SPContext.Current.Site.Url))
    			{
    				using (SPWeb web = site.OpenWeb())
    				{
    					SPList list = web.Lists["News"];
    					if (list != null)
    					{
    						SPQuery query = new SPQuery();
    						query.Query = "<Where><Eq><FieldRef Name='Isactive' /><Value Type='Boolean'>1</Value></Eq></Where>";
    						SPListItemCollection collitem = list.GetItems(query);
    
    						rptsmartspeak.DataSource = collitem.GetDataTable();
    						rptsmartspeak.DataBind();
    
    					}
    				}
    			}
    		}
    		protected string FormatDescription(object item, string fieldName)
    		{
    			if (string.IsNullOrEmpty(DataBinder.Eval(item, fieldName).ToString()))
    			{
    				return string.Empty;
    			}
    			else
    			{
    				string text = DataBinder.Eval(item, fieldName).ToString();
    				if (text.Length < 250)
    				return string.Format("{0}", text);
    				return string.Format("{0}", text.Substring(0, 250));
    			}
    		}
    
    	}
    }

    More information is here:

    http://www.c-sharpcorner.com/UploadFile/746cd9/using-repeater-control-in-sharepoint-news-rollup-webpart/

    Or you can provide more details(provide the complete code in use if possible) about how to reproduce this issue, others would get easier to research on it.

    Best Regards,

    Dennis



    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com


    Thursday, March 23, 2017 3:16 AM
    Moderator
  • Hi,

    thanks for your response

    Problem:

    how to use update panel in SharePoint web-part ( custom ) for asynchronous 

    without update panel everything is working fine but as  i place update panel it doesn't reload data into repeater/grid-view control

    Need help to resolve this issue

    Thanks

    Friday, March 24, 2017 6:18 AM
  • Hi,

    is there anyone who can help me out

    Thanks

    Monday, March 27, 2017 6:19 AM
  • Hi,

    Please provide the complete code in use if possible, which should make the issue easier to be researched.

    Best Regards,

    Dennis


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Monday, March 27, 2017 7:01 AM
    Moderator
  • Hi,

    please have a look on my complete source code ( update panel like asp.net )

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:UpdateProgress ID="prog" runat="server">
                <ProgressTemplate>
                    Please Wait Loading....
                </ProgressTemplate>
            </asp:UpdateProgress>

            <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">

                <h1 class="subhead">HBL Bazaar</h1>
                <%--<div class="breadcrumb_hbl"><a href="#">Home</a> &gt; HBL Bazaar</div>--%>
                <div class="col-xs-12 col-sm-4 col-md-4 col-lg-4 mobilepadding">
                    <h2>Search By Keyword</h2>
                    <div class="input-group">
                        <asp:TextBox ID="txtSearch" runat="server" placeholder="Search" CssClass="form-input3"></asp:TextBox>

                        <span class="input-group-btn">
                            <asp:LinkButton ID="Button1" CssClass="btn-banner btn-applyfor" runat="server" OnClick="btnSearch_Click" Text="Search <span class='glyphicon glyphicon-search'></span>" />
                            <%--<button class="btn-banner btn-applyfor" type="button">Search <span class="glyphicon glyphicon-search"></span></button>--%>
                        </span>
                    </div>
                </div>
                <div class="col-xs-12 col-sm-4 col-md-4 col-lg-4 mobilepadding middlefilter">
                    <h2>Category By</h2>
                    <div class="input-group">
                        <asp:DropDownList ID="ddlCategory" runat="server" CssClass="form-control form-input3 form-drp3"></asp:DropDownList>
                        <span class="input-group-btn">
                            <asp:LinkButton ID="LinkButton1" CssClass="btn-banner btn-applyfor" runat="server" OnClick="btnSearch_Click" Text="Apply <span class='glyphicon glyphicon-ok'></span>" />
                            <%--<button class="btn-banner btn-applyfor" type="button">Apply <span class="glyphicon glyphicon-ok"></span></button>--%>
                        </span>
                    </div>
                </div>
                <div class="col-xs-12 col-sm-4 col-md-4 col-lg-4 mobilepadding">
                    <h2>Sort By</h2>
                    <div class="input-group">
                        <asp:DropDownList ID="ddlSort" runat="server" CssClass="form-control form-input3">
                            <asp:ListItem Text="New In" Value="New In"></asp:ListItem>
                            <asp:ListItem Text="Lowest Price" Value="Lowest Price"></asp:ListItem>
                            <asp:ListItem Text="Highest Price" Value="Highest Price"></asp:ListItem>
                            <asp:ListItem Text="Name" Value="Name"></asp:ListItem>
                        </asp:DropDownList>
                        <span class="input-group-btn">
                            <asp:LinkButton ID="LinkButton2" CssClass="btn-banner btn-applyfor" runat="server" OnClick="btnSearch_Click" Text="Apply <span class='glyphicon glyphicon-ok'></span>" />
                            <%--<button class="btn-banner btn-applyfor" type="button">Apply <span class="glyphicon glyphicon-ok"></span></button>--%>
                        </span>
                    </div>
                </div>


                <asp:Repeater ID="RptAds" runat="server">
                    <HeaderTemplate>
                    </HeaderTemplate>
                    <ItemTemplate>



                        <div class="col-xs-4">
                            <div class="downbar">
                                <div class="container-fluid shop">
                                    <img src="<%# HBL.Bazaar.BAL.GetThumbnailSource(Eval("ID")) %>" width="100px" height="100px">
                                    <h2 class="greentext"><%# Eval("Title") %> </h2>
                                    <h3><%# Eval("Price") %> </h3>
                                    <a href="<%# SPContext.Current.Web.Url + "/Pages/Ad-Details.aspx?AdID=" + Eval("ID") %>" class="btn btn-default btn-loan">Buy</a>
                                </div>
                            </div>
                        </div>

                    </ItemTemplate>
                    <FooterTemplate>
                    </FooterTemplate>
                </asp:Repeater>

                <div style="clear: both"></div>
                <div class="col-xs-2 col-sm-2 col-md-2 col-lg-2">
                </div>
                <div class="col-xs-8 col-sm-8 col-md-8 col-lg-8">
                    <div class="center-block paginationDiv">
                        <table class="pagination">
                            <tr>
                                <td>
                                    <asp:LinkButton ID="lbFirst" runat="server"
                                        OnClick="lbFirst_Click" CssClass="btn-banner">First</asp:LinkButton>
                                </td>
                                <td>
                                    <asp:LinkButton ID="lbPrevious" runat="server"
                                        OnClick="lbPrevious_Click" CssClass="btn-banner">Previous</asp:LinkButton>
                                </td>
                                <td>
                                    <asp:DataList ID="rptPaging" runat="server"
                                        OnItemCommand="rptPaging_ItemCommand"
                                        OnItemDataBound="rptPaging_ItemDataBound"
                                        RepeatDirection="Horizontal" CssClass="NoPadding">
                                        <ItemTemplate>
                                            <asp:LinkButton ID="lbPaging" runat="server"
                                                CommandArgument='<%# Eval("PageIndex") %>'
                                                CommandName="newPage"
                                                Text='<%# Eval("PageText") %> ' CssClass="pagerLinkButton">
                                            </asp:LinkButton>
                                        </ItemTemplate>
                                    </asp:DataList>
                                </td>
                                <td>
                                    <asp:LinkButton ID="lbNext" runat="server"
                                        OnClick="lbNext_Click" CssClass="btn-banner">Next</asp:LinkButton>
                                </td>
                                <td>
                                    <asp:LinkButton ID="lbLast" runat="server"
                                        OnClick="lbLast_Click" CssClass="btn-banner">Last</asp:LinkButton>
                                </td>
                                <td></td>
                            </tr>
                        </table>

                    </div>
                    <div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
                    </div>
                    <div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
                        <div class="center-block lblTableInfoTableDiv" runat="server" id="lblTableInfo">
                            <table class="lblTableInfoTable">
                                <tr>
                                    <td>
                                        <asp:Label ID="lblpage" runat="server" Text=""></asp:Label>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </div>

                    <div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
                    </div>
                </div>

                <div class="col-xs-2 col-sm-2 col-md-2 col-lg-2">
                </div>

            </div>

        </ContentTemplate>
    </asp:UpdatePanel>

    Monday, March 27, 2017 10:37 AM
  • Hi 

    waiting for solutions.i have shared code.

    Thanks

    Tuesday, March 28, 2017 6:40 AM
  • Hi,

    Please check the steps below:

    1. Create a custom list "CustomList18" and add "Description" and "Isactive" fields.

    2. Create a Farm solution with Visual web part using Visual Studio.

    3. Add the code below into UpdatePanelVisualWebPart.ascx.

    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
         <ContentTemplate>
            <div id="divloadingImage" visible="true" runat="server">
               <br />
               <asp:Image ID="imgLoading" runat="server" ImageUrl="/_layouts/Images/gears_anv4.gif" />
               <br />
            </div>
    
            <div id="divContent" visible="false" style="height:150px; width:200px" runat="server">
                <table  style="width:100%" >
                <tr>
                    <td  style="width:10%" ></td>
                    <td  style="width:80%" >
                
                        <div class="smartspeak" style="padding-right: 20px; height:300px; width:280px;">
                            <asp:Repeater ID="rptsmartspeak" runat="server">
                            <ItemTemplate>
             
                                <h2 style="padding-top: 5px; font-weight: 700; font-size: 12px;">
                                    <%#DataBinder.Eval(Container.DataItem,"Title")%>
                                </h2>
                                <br />
                                <br />
                                <p  style="margin-top: -39px;">
                                <%#DataBinder.Eval(Container.DataItem,"Description")%>            
                                </p>
                                <hr />
                            </ItemTemplate>
                            </asp:Repeater>
                        </div>          
                    </td>
                    <td  style="width:10%" ></td>
                </tr>
                </table>
             </div>
             <asp:Timer ID="timerNews" Interval="1" runat="server" ontick="timerNews_Tick"></asp:Timer>
        </ContentTemplate>
     </asp:UpdatePanel> 

    4. Add the following code into UpdatePanelVisualWebPart.ascx.cs.

    using Microsoft.SharePoint;
    using System;
    using System.ComponentModel;
    using System.Web.UI.WebControls.WebParts;
    
    namespace UpdatePanelTest.UpdatePanelVisualWebPart
    {
        [ToolboxItemAttribute(false)]
        public partial class UpdatePanelVisualWebPart : WebPart
        {
            // Uncomment the following SecurityPermission attribute only when doing Performance Profiling on a farm solution
            // using the Instrumentation method, and then remove the SecurityPermission attribute when the code is ready
            // for production. Because the SecurityPermission attribute bypasses the security check for callers of
            // your constructor, it's not recommended for production purposes.
            // [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Assert, UnmanagedCode = true)]
            public UpdatePanelVisualWebPart()
            {
            }
    
            protected override void OnInit(EventArgs e)
            {
                base.OnInit(e);
                InitializeControl();
            }
    
            protected void Page_Load(object sender, EventArgs e)
            {
                if (!Page.IsPostBack)
                {
                    Bindspeaker();
                }
    
            }
    
            private void Bindspeaker()
            {
                using (SPSite site = new SPSite(SPContext.Current.Site.Url))
                {
                    using (SPWeb web = site.OpenWeb())
                    {
                        SPList list = web.Lists["CustomList18"];
                        if (list != null)
                        {
                            SPQuery query = new SPQuery();
                            query.Query = "<Where><Eq><FieldRef Name='Isactive' /><Value Type='Boolean'>1</Value></Eq></Where>";
                            SPListItemCollection collitem = list.GetItems(query);
    
                            rptsmartspeak.DataSource = collitem.GetDataTable();
                            rptsmartspeak.DataBind();
    
                        }
                    }
                }
            }
    
            protected void timerNews_Tick(object sender, EventArgs e)
            {
                Bindspeaker();
                divloadingImage.Visible = false;
                divContent.Visible = true;
                timerNews.Enabled = false;
    
            }
    
        }
    }
    

    5. Deploy it.

    Results:

    More information:

    Loading SharePoint Web Parts Contents Asynchronously Using Update Panel and Ajax

    https://code.msdn.microsoft.com/sharepoint/Loading-SharePoint-Web-ddce3f8f

    Best Regards,

    Dennis


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Tuesday, March 28, 2017 10:05 AM
    Moderator
  • Thanks for your feedback.here you are using timer control .

    Problem:

    i want async postback.

    I have a button ( asp:button )  when user click on it so it fetches data from SharePoint list to show into repeater control.

    How can i do this to make async post-back.

    Thanks

    Tuesday, March 28, 2017 10:37 AM
  • Hi,

    Please check the code below:

    <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
         <ContentTemplate>      
            <div id="divContent" style="height:150px; width:200px" runat="server">
                <table  style="width:100%" >
                <tr>
                    <td  style="width:10%" ></td>
                    <td  style="width:80%" >
                
                        <div class="smartspeak" style="padding-right: 20px; height:300px; width:280px;">
                            <asp:Repeater ID="rptsmartspeak" runat="server">
                            <ItemTemplate>
             
                                <h2 style="padding-top: 5px; font-weight: 700; font-size: 12px;">
                                    <%#DataBinder.Eval(Container.DataItem,"Title")%>
                                </h2>
                                <br />
                                <br />
                                <p  style="margin-top: -39px;">
                                <%#DataBinder.Eval(Container.DataItem,"Description")%>            
                                </p>
                                <hr />
                            </ItemTemplate>
                            </asp:Repeater>
                        </div>          
                    </td>
                    <td  style="width:10%" ></td>
                </tr>
                </table>
             </div>   
             <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Refresh" />     
        </ContentTemplate>
     </asp:UpdatePanel> 


            protected void Page_Load(object sender, EventArgs e)
            {
                if (!Page.IsPostBack)
                {
                    Bindspeaker();
                    Label1.Text = DateTime.Now.ToString();
                }
    
            }
    
            private void Bindspeaker()
            {
                using (SPSite site = new SPSite(SPContext.Current.Site.Url))
                {
                    using (SPWeb web = site.OpenWeb())
                    {
                        SPList list = web.Lists["CustomList18"];
                        if (list != null)
                        {
                            SPQuery query = new SPQuery();
                            query.Query = "<Where><Eq><FieldRef Name='Isactive' /><Value Type='Boolean'>1</Value></Eq></Where>";
                            SPListItemCollection collitem = list.GetItems(query);
    
                            rptsmartspeak.DataSource = collitem.GetDataTable();
                            rptsmartspeak.DataBind();
    
                        }
                    }
                }
            }
    
            protected void Button1_Click(object sender, EventArgs e)
            {
                Bindspeaker();
            }

    Best Regards,

    Dennis


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    • Marked as answer by qasimidl Thursday, March 30, 2017 11:12 AM
    • Unmarked as answer by qasimidl Thursday, March 30, 2017 11:12 AM
    • Marked as answer by qasimidl Thursday, March 30, 2017 11:12 AM
    • Unmarked as answer by qasimidl Thursday, March 30, 2017 11:12 AM
    • Marked as answer by qasimidl Friday, March 31, 2017 7:36 AM
    Wednesday, March 29, 2017 1:45 AM
    Moderator
  • Hi,

    Its working Dennis ,so nice of you.

    Please let me know one more thing. i want to show progress " loading  image/bar " on above text.

    right now its taking spaces while showing image.

    here is my code:

       <div style="padding-left: 200px;">
                    <asp:UpdateProgress ID="up_prog" runat="server" AssociatedUpdatePanelID="up_bazar">
                        <ProgressTemplate>
                            <div style="padding-left: 120px;" class="center">
                                <img src="../_layouts/15/images/loading2.gif" width="100px" />
                            </div>
                        </ProgressTemplate>
                    </asp:UpdateProgress>
                </div>

    Thanks

    Thursday, March 30, 2017 7:55 AM
  • Hi,

    Please try to replace

    <img src="../_layouts/15/images/loading2.gif" width="100px" />

    with

    <img src="/_layouts/15/images/loading16.gif" width="100px" />

    More information:

    3 Different Ways to Display Progress in an ASP.NET AJAX Application

    http://www.dotnetcurry.com/ShowArticle.aspx?ID=227

    Best Regards,

    Dennis


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    • Marked as answer by qasimidl Friday, March 31, 2017 7:36 AM
    Thursday, March 30, 2017 10:09 AM
    Moderator
  • thanks again for your valuable suggestions.

    Problem:

    How to show "Loading.gif " image on above text or repeater . right now its taking spaces ( " loading.gif ")

    as it disappeared also spaces removed when it appeares so it takes spaces.

    I want to show on above text ( loading.gif ) Image .

    Thanks

    Thursday, March 30, 2017 11:20 AM
  • Hi,

    i have done using this css

      .divWaiting {
            ;
            background-color: #FAFAFA;
            z-index: 2147483647 !important;
            opacity: 0.8;
            overflow: hidden;
            text-align: center;
            top: 0;
            left: 0;
            height: 100%;
            width: 100%;
            padding-top: 20%;

    link

    https://www.codeproject.com/Tips/665923/Using-UpdateProgress-and-Making-Background-Inactiv

    Thanks all. Specially Dennis .you are Great.

    Friday, March 31, 2017 7:37 AM
  • Hi,

    Glad to hear that you solve this issue, thanks for your sharing.

    Best Regards,

    Dennis


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    • Marked as answer by qasimidl Thursday, April 6, 2017 9:45 AM
    Friday, March 31, 2017 8:22 AM
    Moderator