Solved

Image refresh chrome asynchronous request (asp.net)

Posted on 2013-12-07
2
392 Views
Last Modified: 2013-12-11
Hello, I have a problem with google Chrome, not happening in Firefox/IE.
In an user evaluation page, when selecting proper answer for a question (checking ckAnswer checkbox from gvAnswers gridview) , there is generated an asynchronous request. But, during this asynchronous request, the image from code below (imgGroup2) is reloaded with visible refresh gap (like a wink), which makes it annoying for end user
The issue is only in Chrome.....

The code below.
Any suggestions?
Thanks!

<asp:UpdatePanel ID="up" runat="server" ChildrenAsTriggers="true">
                <ContentTemplate>
                <asp:Panel ID="pnlChapter" runat="server" CssClass="TestChapter">
                    <asp:Label ID="lblGroup1" runat="server" Text=""></asp:Label>
                </asp:Panel>
                
                <asp:Panel ID="pnlWrap2" runat="server" CssClass="TestWrap2">
                    <asp:Panel ID="pnlWrap3" runat="server" CssClass="TestWrap3">
                        
                        <asp:Panel ID="pnlSubChapter" runat="server" CssClass="TestSubchapter">
                            <asp:Label ID="lblGroup2" runat="server" Text=""></asp:Label>
                        </asp:Panel>
                        <br />
                        <asp:Panel ID="pnlDomain" runat="server" CssClass="TestDomain">
                            <asp:Label ID="lblGroup3" runat="server" Text=""></asp:Label>
                        </asp:Panel>
                        
                    </asp:Panel>                
                    <asp:Panel ID="pnlImage" runat="server" CssClass="TestImage">
                        <asp:Image ID="imgGroup2" runat="server" AlternateText="No image found." CssClass="TestImage" />
                    </asp:Panel>          
                </asp:Panel>
            
                <asp:Panel ID="pnlQuestion" runat="server" CssClass="TestQuestionText">
                    <asp:Label ID="lblQuestion" runat="server" Text=""></asp:Label>
                </asp:Panel>
<asp:Panel ID="pnlAnswer" runat="server" CssClass="TestAnswerText">
                    <asp:GridView ID="gvAnswers" runat="server" AutoGenerateColumns="false" 
                         ShowHeader="false" GridLines="None">
                        <RowStyle CssClass="gridviewRowTest" />
                        <Columns>
                            <asp:TemplateField ItemStyle-Wrap="true">
                                <ItemTemplate>
                                    <asp:CheckBox ID="ckAnswer" runat="server" TextAlign="Left" AutoPostBack="true" 
                                        Checked="false" OnCheckedChanged="ckAnswer_CheckedChanged" />                                                               
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="AnswerText" HeaderText="" />                                                        
                        </Columns>
                    </asp:GridView>
                    <asp:TextBox ID="tbAnswerArea" runat="server" TextMode="MultiLine" Rows="5" Width="200">
                    </asp:TextBox>
                </asp:Panel>

<asp:Button ID="btValidate" runat="server" Text="Valideaza" Enabled="false" CssClass="buttonStandard" OnClick="btValidate_Click"/>
</ContentTemplate>
            </asp:UpdatePanel>     

Open in new window

0
Comment
Question by:danielivanov2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 

Accepted Solution

by:
danielivanov2 earned 0 total points
ID: 39711720
Solved by putting image in a separate UpdatePanel and associating btValidate button with a Postback Trigger for updating second UpdatePanel, as below:
<asp:UpdatePanel ID="up" runat="server" ChildrenAsTriggers="true">
            <ContentTemplate>
                <asp:Panel ID="pnlAnswer" runat="server" CssClass="TestAnswerPanel">
                    <asp:GridView ID="gvAnswers" runat="server" AutoGenerateColumns="false" 
                         ShowHeader="false" GridLines="None">
                        <RowStyle CssClass="gridviewRowTest" />
                        <Columns>
                            <asp:TemplateField>
                                <ItemStyle CssClass="TestAnswerText"/>
                                <ItemTemplate>                                    
                                    <asp:CheckBox ID="ckAnswer" runat="server" TextAlign="Left" AutoPostBack="true"  
                                        Checked="false" OnCheckedChanged="ckAnswer_CheckedChanged" />                                                                                                   
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="AnswerText" HeaderText="" />                                                        
                        </Columns>
                    </asp:GridView>
                    <asp:TextBox ID="tbAnswerArea" runat="server" TextMode="MultiLine" Rows="5" Width="200">
                    </asp:TextBox>
                </asp:Panel>                
                </ContentTemplate>
            </asp:UpdatePanel>

<asp:UpdatePanel ID="upValidate" runat="server" UpdateMode="Conditional">
                <ContentTemplate>
                    <asp:Button ID="btValidate" runat="server" Text="Valideaza" Enabled="false" CssClass="buttonStandard" OnClick="btValidate_Click"/>
                    <asp:Panel ID="pnlProgress" runat="server" CssClass="TestProgress">
                        <asp:DataList ID="dtListGroup1" runat="server" RepeatDirection="Horizontal" OnItemDataBound="dtListGroup1_ItemDataBound">                    
                            <ItemTemplate>                            
                                <asp:Panel ID="pnlGroupDesc" runat="server" Cssclass="TestGroup1Block">
                                    <asp:Label ID="lblGroupDesc" runat="server" Text='<%# Eval("GroupDesc")%>'></asp:Label>                                
                                </asp:Panel>
                                <asp:Literal ID="ltGroup1Id" runat="server" Text='<%# Eval("GroupId")%>' Visible="false"></asp:Literal>
                                <asp:Literal ID="ltBackColor" runat="server" Text='<%# Eval("BackColor")%>' Visible="false"></asp:Literal>
                                <asp:Literal ID="ltForeColor" runat="server" Text='<%# Eval("ForeColor")%>' Visible="false"></asp:Literal>
                                <ajaxToolKit:RoundedCornersExtender ID="RoundedCornersExtender2" runat="server" TargetControlID="pnlGroupDesc" Radius="10" Corners="All">
                                </ajaxToolKit:RoundedCornersExtender>                           
                            </ItemTemplate>
                        </asp:DataList>
                    </asp:Panel>                                                                                                    
                </ContentTemplate>
                <Triggers>
                    <asp:PostBackTrigger ControlID="btValidate" />
                </Triggers>
            </asp:UpdatePanel>

Open in new window


if (ck)
            {
                btValidate.Enabled = true;
                btValidate.CssClass = "buttonValidateOk";
                upValidate.Update();
            }
            else
            {
                btValidate.Enabled = false;
                btValidate.CssClass = "buttonValidateNotOk";
                upValidate.Update();
            }

Open in new window

0
 

Author Closing Comment

by:danielivanov2
ID: 39711721
no answer received, I had to find the answer myself
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

OverviewThis article demonstrates a simple search form using AJAX. The purpose of the article is to demonstrate how to use the same code to render a page and javascript (JQuery) and AJAX to make subsequent calls to refine the results. The princip…
Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…
How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…

689 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question