Sunday, March 11, 2012

Random Ajax Problem for Users

Would you mind posting the page here so we can take a look and see if there is somthing wrong? 10,000 work better than 2!


The page I was originally concerned about is much too long. However, I added an update panel to another page and the user is reporting problems with it as well. Code below from aspx. I have a feeling this is something related to the user browser settings or user security program becasue it only impacts a few users.

<%@. Page Language="vb" AutoEventWireup="false" Codebehind="imagesall.aspx.vb"Inherits="ImmediateWeb.imagesall"%><!DOCTYPE html PUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" > <HEAD> <title>Images List</title><meta http-equiv="Page-Exit" content="progid:DXImageTransform.Microsoft.Fade(duration=.1)" /> </HEAD><body vLink=#000000 aLink=#000000 link=#000000 ><form id=Form1 method=post runat="server"><asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager><asp:UpdatePanel ID="UpdatePanel1" runat="server"><ContentTemplate><table id=Table1 cellSpacing=0 cellPadding=0 width=630 border=0> <TBODY> <tr> <td vAlign=top width="100%"><%if Request.QueryString("R") <>"Y" then%> <%if GalleryImagePath <>"none" then%> <A href="imagesall.aspx?Forum=<%=Forum%>" ><IMG align=absbottom alt="<%=Forum%> Forum" src="../images/getimage.aspx?Forum=<%=Forum%>&what=Gallery" align=left border=0 ></A><%else%> <A href="imagesall.aspx?Forum=<%=Forum%>" ><IMG align=absbottom height=30 alt="Click for Gallery Home" src="../projectimages/imagegallery.gif" width=252 border=0 ></A><%end if%><%end if%><font class=TextArial10 face=Arial color=#000000 size=2>            <b><asp:label id=RecordCountLabel runat="server" enableviewstate="true"></asp:label> Images </b></FONT> </TD></TR> <tr> <td><asp:dropdownlist id=AlbumNames runat="server" datatextfield="AlbumName" datavaluefield="AlbumID" onselectedindexchanged="ChangePageAuto" AutoPostBack="True"></asp:dropdownlist>    <asp:dropdownlist id=UserNames runat="server" datatextfield="Name" datavaluefield="UserID" onselectedindexchanged="ChangePageAuto" AutoPostBack="True"></asp:dropdownlist><%if Wizop ="Y" or WizopForum ="Y" then%>    <asp:dropdownlist id="ddAdminAlbums" runat="server" onselectedindexchanged="ChangePageAuto" AutoPostBack="True"></asp:dropdownlist><%end if%></TD></TR> <tr> <td><%If PagingSet.IDListClass(0) = 0 then%> No images posted to this site as yet, or search produced no results.<br ><br><br >Return to <A class=BodyLinks href="../index.aspx+Forum+<%=Forum%>"><%=Forum%> Home</A>   |  <A class=BodyLinks href="imagesall.aspx?Forum=<%=Forum%>" >Gallery Home</A><%if ImgUserUpload ="Y" or Wizop="Y" or WizopForum="Y" then%>  |  <A class=BodyLinks href="uploadx.aspx?Forum=<%=Forum%>&Path1=<%=Request.ServerVariables("PATH_INFO")%>">Upload Image</A><%end if%><%else%><%if Request.QueryString("R") <>"Y" then%><p align=center><b><font face=Arial color=#000000 size=2><A class=BodyLinks href="../index.aspx+Forum+<%=Forum%>"><%=Forum%> Home</A>  |  <A class=BodyLinks href="imagesall.aspx?Forum=<%=Forum%>" >Gallery Home</A><%if ImgUserUpload ="Y" or Wizop="Y" or WizopForum="Y" then%> |  <A class=BodyLinks href="uploadx.aspx?Forum=<%=Forum%>&Path1=<%=Server.HtmlEncode(Request.ServerVariables("PATH_INFO"))%>">Upload Image</A> </FONT></B></P><%end if%><%end if%> <asp:repeater id=myRepeater runat="server" OnItemDataBound="myRepeater_ItemDataBound"><HeaderTemplate><table border="0" width="100%" cellspacing="0" cellpadding="0" id="Table3"><tr></HeaderTemplate><itemtemplate><td align="center" valign="top" width="25%"><%if Request.QueryString("R") <>"" then%><a href='imageview.aspx+Forum+<%=Forum%>+Category+<%# Container.DataItem("ArticleCategory") %>+ImageID+<%# Container.DataItem("ArticleCode") %>+AlbumID+<%=AlbumID%>+UserID+<%=UserID%>+curpage+<%# Container.DataItem("ArticleCode") %>+SearchTerm+<%=SearchTermEnc%>+R+<%=Request.QueryString("R")%>'><%else%><a href='imageview.aspx+Forum+<%=Forum%>+Category+<%# Container.DataItem("ArticleCategory") %>+ImageID+<%# Container.DataItem("ArticleCode") %>+AlbumID+<%=AlbumID%>+UserID+<%=UserID%>+curpage+<%# Container.DataItem("ArticleCode") %>+SearchTerm+<%=SearchTermEnc%>'><%end if%><img src='GetImageThumb.aspx?Forum=<%=Forum%>&Category=<%# Container.DataItem("ArticleCategory") %>&ImageID=<%# Container.DataItem("ArticleCode") %>&curpage=<%# Container.DataItem("ArticleCode") %>' hspace="10" vspace="15" border="2" width='<%# Container.DataItem("Blob1W") %>' height='<%# Container.DataItem("Blob1H") %>' alt="Click for Large Image"></a><br clear="all"><%if Request.QueryString("R") <>"" then%><a class="BodyLinks" href='imageview.aspx+Forum+<%=Forum%>+Category+<%# Container.DataItem("ArticleCategory") %>+ImageID+<%# Container.DataItem("ArticleCode") %>+AlbumID+<%=AlbumID%>+UserID+<%=UserID%>+curpage+<%# Container.DataItem("ArticleCode") %>+SearchTerm+<%=SearchTermEnc%>+R+<%=Request.QueryString("R")%>'><%else%><a class="BodyLinks" href='imageview.aspx+Forum+<%=Forum%>+Category+<%# Container.DataItem("ArticleCategory") %>+ImageID+<%# Container.DataItem("ArticleCode") %>+AlbumID+<%=AlbumID%>+UserID+<%=UserID%>+curpage+<%# Container.DataItem("ArticleCode") %>+SearchTerm+<%=SearchTermEnc%>'><%end if%><b><%# Container.DataItem("ArticleName") %></b></a></td></itemtemplate><SeparatorTemplate><asp:Literal id=litTR runat="server"></asp:Literal></SeparatorTemplate><FooterTemplate></tr></table></FooterTemplate></asp:repeater> <hr><!-- Begin selections--> <div align=center> <table cellSpacing=0 cellPadding=4> <tr vAlign=top> <td align=right><asp:button id=FirstLink onclick=ChangePage runat="server" text="First"></asp:button>   <asp:button id=PreviousLink onclick=ChangePage runat="server" text="Prev"></asp:button>     </TD> <td><asp:dropdownlist id=JumpPage runat="server" onselectedindexchanged="ChangePage" autopostback="true"></asp:dropdownlist>/ <asp:label id=PageCountLabel style="FONT-SIZE: 10pt" runat="server" enableviewstate="true"></asp:label>     </TD> <td><asp:button id=NextLink onclick=ChangePage runat="server" text="Next"></asp:button>   <asp:button id=LastLink onclick=ChangePage runat="server" text="Last"></asp:button></TD></TR></TABLE></DIV> <table cellSpacing=0 cellPadding=4> <tr vAlign=top bgColor=whitesmoke> <td colSpan=3><font class=TextArial10 face=Arial color=#000000 size=2><asp:label id=lblSearchText runat="server" enableviewstate="true"></asp:label> <asp:textbox id=txtSearch runat="server" MaxLength="50"></asp:textbox></FONT></TD> <td><font class=TextArial10 face=Arial color=#000000 size=2><b >Thumbs Per Page:</B> <asp:dropdownlist id=SelectPageSize runat="server" onselectedindexchanged="SetChangeFlag"><asp:listitem text="12" value="12" /><asp:listitem text="24" value="24" /><asp:listitem text="36" value="36" /><asp:listitem text="48" value="48" /></asp:dropdownlist></FONT></TD> <td><font class=TextArial10 face=Arial color=#000000 size=2><b >Sort By:</B> <asp:dropdownlist id=SortBy runat="server" onselectedindexchanged="SetChangeFlag"><asp:listitem text="Date" value="ArticleCode" /><asp:listitem text="Title" value="ArticleName" /></asp:dropdownlist><asp:dropdownlist id=SortDir runat="server" onselectedindexchanged="SetChangeFlag"><asp:listitem text="DESC" value="DESC" /><asp:listitem text="ASC" value="ASC" /></asp:dropdownlist></FONT></TD></TR> <tr> <td align=center><asp:button id=UpdateDisplayButton onclick=ChangePage runat="server" text="Update"></asp:button></TD></TR></TABLE><asp:RegularExpressionValidator id=revSearch runat="server" ErrorMessage="Invalid Search Characters - Not Allowed: ^<>'`~!/@.\#}$%:;)(_^{*=|+" ControlToValidate="txtSearch" ValidationExpression="^[^<>'`~!/@.\#}$%:;)(_^{*=|+]+$"></asp:RegularExpressionValidator><!-- end selections--><br><br><asp:Literal id=litURL Runat=server /><asp:LinkButton CssClass="smBodyLinks" id="linkClipboard" Visible=False runat="server">Copy Album URL</asp:LinkButton><asp:literal id="literalToClipboard" Visible=False runat="server" /></TD></TR></TBODY></TABLE><%end if%></ContentTemplate></asp:UpdatePanel></FORM> </body></HTML>

Here is some more info about the page where some users have problems. The page has about 5 asp panels. An update panel is used in only one asp panel.

<asp:panel id="pnlRead" runat="server" Width="630px"> <asp:UpdatePanel ID="UpdatePanel1" RenderMode="Inline" UpdateMode="Conditional" runat="server"> <ContentTemplate> <fieldset>In this area is data displayed from database via a Repeater.Each item in the repeater contains links set when the repeater is bound. Above and Below each repeater item are next and previous buttons to page through the data. The Repeater ID is"mr"The Trigger below causes any Repeater set links to do a full postback, typically making another asp panel visible.Some users report that clicking theNext button on page does not refresh the page; it does nothing.I cannot reproduce the problem in either IE or Firefox, leading me to conclude
it must have something to do with the user machines.Any ideas?</fieldset> </ContentTemplate> <Triggers> <asp:PostBackTrigger ControlID="mr" /> </Triggers> </asp:UpdatePanel> </asp:panel>

Wow, everything is inside one Update Panel, that's lots of code, I would start with just moving controls that produce a postback inside the updatepanel, then if still happens, keep removing a few controls at the time, when you identify the control with the issue, otherwise I do not see any problem besides a few embeded methods. Also is important that any javascript is register with the ScriptManager.


You can view the page via one of our sites where visitor access is allowed.

Go tohttp://www.FirearmsForum.com

Click on the "message board" link. On next page click the link at top for "Enter message board as a visitor."

Then click on any of the "Read New" links in the various message sections shown.

It is the "Next" button on the resultant page that some users report does nothing. I'd say 5% or less of all users have a problem.

No comments:

Post a Comment