A Programmer's Dream

Ajax.Asp.Net and Me...

Posted by Stephen Wrighton on 02 May 2007

Okay, I have to wonder what on earth I'm doing wrong with this thing. I have an Ajax.ASP.Net UpdatePanel and UpdateProgressPanel on an ASPX page. No, big deal - the runtime is supposed to handle all of that fun stuff automatically.

I made sure that I had my ScriptHandler and everything is situated the way it's supposed to be according to the documentation found on the website.

But it doesn't work.

Oh, I get the UpdateProgressPanel to display in Firefox - but Firefox has other issues with my dynamically created DIV's not doing what I expect them to.

So, of course, being the enterprising programmer that I am, I went and copied the code from the Ajax.ASP.Net documentation page for UpdateProgressPanels. Created a page on my site and tried it. Low and behold, it works perfectly.

So, now my new issue to discover is just how I'm screwing up the code. After all, it's not that complicated. This is what I have:
<form>
<asp:scriptmanager id="ScriptManager1" runat="server" enablepartialrendering="true">
<services>
<asp:servicereference path="getData.asmx">
</asp:servicereference>
</services>
</asp:scriptmanager>

<asp:updateprogress id="UpdateProgress1" runat="server">
<progresstemplate>
<img src="http://www2.blogger.com/images/loading.gif" alt="Loading..." align="texttop" border="0" /> <strong>Loading...</strong>
</progresstemplate>
</asp:updateprogress>

<asp:updatepanel id="UpdatePanel1" runat="server" updatemode="Conditional">
<triggers> <asp:asyncpostbacktrigger controlid="btnBack8" eventname="Click"></asp:asyncpostbacktrigger></triggers>
<contenttemplate>
</asp:updatepanel><div class="InnerContentArea" id="Back8Data">
<asp:label runat="server" id="lblBack8Data"></asp:label>
</div>
</contenttemplate>

<asp:updatepanel id="InsertEmployeeUpdatePanel" runat="server" updatemode="Conditional">
<contenttemplate>
<input runat="server" id="gameID" type="hidden">
<input runat="server" id="GameName" type="hidden">
<input runat="server" id="HighNumber" type="hidden">
<input runat="server" id="NumberDrawn" type="hidden">
<input runat="server" id="DrawsTableName" type="hidden">
<input runat="server" id="GameTypeID" type="hidden">
<input runat="server" id="Numbers" type="hidden"> </contenttemplate></asp:updatepanel>
</form>
Like I said, not that complicated. Yet for whatever reason, it's not behaving the way I would expect it to. In ASP.Net 1.1 controls inside the PANEL control were accessible but the controls that I place in the LOGINVIEW control I have to jump through hoops (well, ctrl.FindControl("ControlName") - which counts as a hoop) to get at it. I have to wonder if it is some arcane thing like that that is causing my issues.

Oh well, I think I'm going to go watch a movie rather than continue pounding my head over this.

Tweet me @kidananubix if you like this post.

Tweet