Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesasp:button rendered as button or as submitasp:button rendered as button or as submit
Previous
 
Next
New Post
2/25/2012 11:42 AM
 

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!




 
New Post
2/26/2012 3:03 PM
 

I managed to solve this issue by including useSubmitBehavior="false". 

However, this still does not explain the difference in behaviour when this attribute is not present. Both sites are running DNN 6.1.3 on IIS7, dev server is Windows 7, production on Windows 2008 64bit.

I'll look into the difference between the web.configs some other time. 

Thinking back, I believe this might have started when I ran into a “PageHandlerFactory-Integrated” has a bad module “ManagedPipelineHandler” error and had to re-register ASP.Net on my production server.




 
New Post
3/13/2012 5:38 AM
 
Did you ever sort this out?

Entrepreneur

PokerDIY Tournament Manager - PokerDIY Tournament Manager<
PokerDIY Game Finder - Mobile Apps powered by DNN
PokerDIY - Connecting Poker Players

 
New Post
3/13/2012 6:43 AM
 
Nope. I have released the site with this workaround. Further investigation will have to wait until early april..

Please do let me know if you happen to discover anything in relation to this!
 
New Post
5/22/2012 4:28 PM
Accepted Answer 
Okay.. turned out to be a lot less complicated and interesting than I thought..

It was just the setting 'Supports Partial Rendering' that was turned off for this particular control on the production server.

Actually really straightforward to see the Ajax scriptblock and the __doPostBack script dissappear. Can't immediately explain why the link to the eventhandler is lost though.

Anyway, it's working fine now :-)
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesasp:button rendered as button or as submitasp:button rendered as button or as submit


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out