Icons not displayed on Async Postback

  1. #1

    Icons not displayed on Async Postback

    I have a asp:MultiView on my Form enclosed in asp:UpdatePanel with 2 views.

    On View1, a button click triggers a Postback, which is async because of being wrapped in an Update Panel. In the server-side click handler, view 2 is made active. On View 2, I have ext:Buttons etc. Every thing else is fine, just that the Icons on buttons & other Coolite controls with their Icons set are NOT displayed.

    I have had this problem in other situations also, with Coolite controls added to a page in an async postback. Every thing else is fine, just the icons do not show up.


  2. #2

    RE: Icons not displayed on Async Postback

    Hi,

    Please note that if you set Icon property during AjaxEvent (or UpdatePanel request) then you must register icon styles during first page load
    For example, if you set

    button.Icon = Icon.Add;
    then you need register this icon

    protected void Page_Load(object sender, EventArgs e)
    {
         if(!Ext.IsAjaxRequest)
         {
               ScriptManager1.RegisterIcon(Icon.Add);
         }
    }
  3. #3

    RE: Icons not displayed on Async Postback

    Now, the Icon is being set in mark-up. But as it's Button is in View 2, the markup's resultant html does NOT get rendered to the browser. So, the browser does NOT request the Icon during the first GET request.

    As you are asking me to register the icons during GET request, it means the Coolite framework would download the icons on the first GET request itself.

    Is it a limitation with the Coolite framework, or it is due to UpdatePanel nature??

    In the current situation, I might do so, but this would be troublesome specially for dynamically generated controls!!

Similar Threads

  1. Replies: 4
    Last Post: Jul 28, 2011, 1:50 PM
  2. [CLOSED] Tab scroll with async postback
    By tansu in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Feb 03, 2010, 8:43 AM
  3. Replies: 2
    Last Post: Dec 02, 2009, 4:57 AM
  4. Replies: 0
    Last Post: Apr 03, 2009, 5:47 AM
  5. Replies: 1
    Last Post: Jun 04, 2008, 10:28 PM

Posting Permissions