Hello there,
When moving my module from my development server to my production server, I ran into a strange issue, unfortunately it's a showstopper.. Somehow asp:button gets rendered differently and the __doPostBack script is not present, causing the servercode to not fire.
I have now brought it down to the following:
TestControl2.asx:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="TestControl2.ascx.cs" Inherits="AMZ.Testing.TestControl2" %>
<%@ Register TagPrefix="dnn" Namespace="DotNetNuke.Web.Client.ClientResourceManagement" Assembly="DotNetNuke.Web.Client" %>
<%@ Register assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI" tagprefix="asp" %>
<asp:Button ID="cmdSamenvatting" runat="server" CssClass="wizbutton next right" Text="Samenvatting »"
onclick="cmdSamenvatting_Click" onclientclick="if (false) return false" />
On my development server the asp:button renders as:
<input type="button" name="dnn$ctr451$TestControl2$cmdSamenvatting" value="Samenvatting »" onclick="if (false) return false;__doPostBack('dnn$ctr451$TestControl2$cmdSamenvatting','')" id="dnn_ctr451_TestControl2_cmdSamenvatting" class="wizbutton next right">
On my production server the button gets rendered as:
<input type="submit" name="dnn$ctr986$TestControl2$cmdSamenvatting" value="Samenvatting »" onclick="if (false) return false;" id="dnn_ctr986_TestControl2_cmdSamenvatting" class="wizbutton next right">
Note the different type attribute (button or submit) and the missing __doPostBack script.
One thing that is also missing is this script block:
<script type="text/javascript">
//<![CDATA[
if (typeof(Sys) === 'undefined') throw new Error('ASP.NET Ajax client-side framework failed to load.');
//]]>
</script>
Now my production server has been running from march 2008 and has since been upgraded to the latest version of DNN. This means when I compare web.configs, there are quite a number of differences from the web.config on my development machine (with Visual Studio 2010 and IIS7).
Strange thing is, everything was working fine until about a week ago and I haven't got a clue what I might have done to get things screwed up. The rest of the site (with 3 portals) functions without problems.
Sorry for the longish post. If anyone as any clue where I might need to look, any advice would be greatly appreciated!