This is a migrated thread and some comments may be shown as answers.

AjaxLoadingPanel is not working with webpart

1 Answer 49 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Savan
Top achievements
Rank 1
Savan asked on 15 Aug 2008, 08:51 AM
Hi,

I am using AjaxLoading Panel in web part,

I had set Transparency= 30, but its not working correctly.
Its only applying to image which I am using in Loading Panel.

But Transparency is not set for whole web part.

What will be the problem?

Some sample code
   
                loadingPanel = new AjaxLoadingPanel();
                loadingPanel.ID = "loadingPanel";
                Image img = new Image();
                img.ImageUrl = "Image Url";
                img.AlternateText = "Loading...";
                loadingPanel.Width = new Unit(100, UnitType.Percentage);               
                loadingPanel.Controls.Add(img);
                loadingPanel.Transparency = 30;

                panel.LoadingPanelID = loadingPanel.ID;
                panel.Controls.Add(loadingPanel);
                this.Controls.Add(panel);


Thanks
Savan

1 Answer, 1 is accepted

Sort by
0
Kevin Babcock
Top achievements
Rank 1
answered on 18 Aug 2008, 02:58 AM
Hello Savan,

The reason transparency is only visible on the image in your RadAjaxLoadingPanel is because there is no other content in the loading panel's containing <div>. The Transparency property works by setting the entire <div> contents to be transparent, according to the percentage value indicated. If you want the entire loading panel to give the same appearance as the image, set the background color of the loading panel to a color that matches your image. For the default loading panel image, I like to use white as the background color.

I hope that helps.

Regards,
Kevin Babcock
Tags
Ajax
Asked by
Savan
Top achievements
Rank 1
Answers by
Kevin Babcock
Top achievements
Rank 1
Share this question
or