Products

Solutions

Resources

Partners

Community

About

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...Getting StartedGetting StartedHTML Generated from ASPX page differs on DNN versionsHTML Generated from ASPX page differs on DNN versions
Previous
 
Next
New Post
4/28/2014 12:00 PM
 

Hello,

I have just spent the last few hours trying to determine why a form is submitted to the server from a button click, which was not the intended behaviour. The form works fine in DNN 7.01.02, I only get the problem in 7.02.02.

In my aspx I have the following markup:



<asp:Button ID="ContentButtonSave" runat="server" Text="Save" />

I have a function for the click event in JQuery where I use the PreventDefault method to prevent the form being submitted and make a AJAX call to a web service instead.

The HTML generated for each button is not the same.

In DNN 7.01.02 the following is generated for the button, which works just fine:



<input type="submit" name="dnn$ctr509$Edit$MainFormUserControl$ContentUserControl$ContentButtonSave" value="Save" id="ContentButtonSave" />

But in DNN 7.02.02 however, the following is generated:



<input type="button" name="dnn$ctr477$Edit$MainFormUserControl$ContentUserControl$ContentButtonSave" value="Save" onclick=" __doPostBack(&#39;dnn$ctr477$Edit$MainFormUserControl$ContentUserControl$ContentButtonSave&#39;,&#39;&#39;)" id="ContentButtonSave" />

Note the additional onclick event.

Since I don't need any server side functionality for this button, I was able to change the server side markup to use plain html:



<input type="submit" value="Save" id="ContentButtonSave" />

Which works OK.







The questions I have are:



What causes the difference in the generated HTML from the two DNN versions?



Is there anyway to prevent this happening in the future?



What else might be effected?

Best Regards,

Steve

 
New Post
4/29/2014 2:15 PM
 
odd - are you sure it's a DNN issue, as I don't believe we have code that intercepts or marks up that control. Do both sites run under the same version of .net?

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
4/30/2014 8:25 AM
 

Hi Cathal,

Thank you for your reply.

Yes, good question. I'm not sure where the issue lies to be honest, may be a question for an ASP.NET forum in that case.

Yes, both projects and application pools target .Net framework 4.0.

Steve

 
New Post
4/30/2014 8:57 AM
 
actually thinking about it more, I think it's a partial updates issue i.e. one has enable partial updates on and the other does not -enable partial updates injects a telerik update panel (which is basically an enhanced asp.net ajax updatepanel), so the controls are updated accordingly i.e.; without an updatepanel a pure post occurs, within one a javascript postback occurs so the page does not full refresh

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
4/30/2014 12:26 PM
 

Hi Cathal,

Thank you for your reply.

I did enable partial updates in the manifest as I'm using Ajax functionality.

But that's the same for both installations which were installed from the same installation kit.

Steve

 
Previous
 
Next
HomeHomeDevelopment and...Development and...Getting StartedGetting StartedHTML Generated from ASPX page differs on DNN versionsHTML Generated from ASPX page differs on DNN versions


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