Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Image refresh chrome asynchronous request (asp.net)

Posted on 2013-12-07
2
Medium Priority
?
398 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Do you come here a lot? Are you lazy like me and don't want to go through the "trouble" of having to click your Dock's Safari icon and then having to click your Experts Exchange Favorites bookmark to get here? Well then this article is for you.
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.
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 +…

609 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