Search code examples
asp.netajaxasp.net-ajaxajaxcontroltoolkitcalendarextender

AJAX Control Tool Kit Controls UI rendering transparently


Hi I have strange problem with Ajax Controls. Transparent background for all the all Ajax Controls like Validator Callout Extender, Calendar Extender, Baloon Popup Extender.

The version of Ajax is 4.1.51116.0 Runtime Version is v4.0.30319

I am not applying any styles targed to these extenders.

Sample Syntax for Calendar Extender follows:

<asp:TextBox ID="txtFrom" runat="server" CssClass="textbox txtsingleline"
    ReadOnly="true"></asp:TextBox>
<asp:ImageButton ID="imgBtnFrom" runat="server" ImageUrl="~/images/Cal20x20.png" Width="20" Height="20" ImageAlign="TextTop" />
<asp:CalendarExtender ID="txtFrom_CalendarExtender" PopupButtonID="imgBtnFrom"
    runat="server" Enabled="True" 
    TargetControlID="txtFrom" Format="MMM d, yyyy">
</asp:CalendarExtender>

It looks like

Calendar Extender

and for validator callout extender:

<asp:TextBox ID="txtDescription" runat="server" CssClass="textbox txtmultiline" MaxLength="400"
    TextMode="MultiLine"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfvDescription" runat="server" Display="None" ControlToValidate="txtDescription" ValidationGroup="ldForm"
    ErrorMessage="Please write Description." Font-Size="Small" ForeColor="Red"
    SetFocusOnError="True"></asp:RequiredFieldValidator>
<asp:ValidatorCalloutExtender ID="rfvDescriptionE" runat="server" TargetControlID="rfvDescription">
</asp:ValidatorCalloutExtender>

it looks like below for light colored background

Validator Callout Extender with light color background on page

and for dark colored background it appears as follows:

enter image description here

If I use the same dll in other simple application, it works good. I'm using GZip for fast response time (Do you think this is ruining the Ajax control's UI?). Prior to using GZip it used to work well in the original application too. I even tried removing GZip code and run the application but in vain.

Any Ideas whether GZip is the cause or any other thing that triggers this error? But I tried removing GZipStreaming


Solution

  • Got It at last.........

    In the GZip code, following line of code is doing the mischief :)

    // Compress only html and stylesheet documents.
            if (contentType == "text/html" || contentType == "text/css")
    

    I changed it as below to make it work.

    // Compress only html and stylesheet documents.
            if (contentType == "text/html")