Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

Maximum ASP
  Ads  
 


  Sponsors  

Meet Our Sponsors

CrystalTech Web Hosting™
Webhost4life, specialists in DNN hosting
Mad Development is a full service interactive agency focusing on the merge of design, technology, e-commerce, and affiliate marketing by providing total website solutions.
SteadyRain
DataSprings - Great Ideas. Always Flowing.
R2integrated - formerly bi4ce
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Two controls, two postback events.
Previous Previous
 
Next Next
New Post 8/21/2008 7:33 AM
User is offline Jesper Wilfing
33 posts
10th Ranked


Two controls, two postback events. 
Modified By Jesper Wilfing  on 8/21/2008 9:55:08 AM)

Hi,

I have two separate controls/modules/ascx files in my main content pane, each with their own submit button. Whats the best way to prevent them from submitting each others forms? Might be me who is lazy in my head right now... But any hints?

EDITED: Seems like it was only the required fields validators that was triggered in my second control. Since nothnig was filled in, they prevented postback which stopped the update that was supposed to update an updatefield... How to solve this.. Hmmmm???

/AdmiralGanj

 
New Post 8/21/2008 8:13 AM
User is offline Brian Dukes
477 posts
www.engagesoftware.com
8th Ranked


Re: Two controls, two postback events. 

I'm assuming you're coming at this from a developer perspective and are willing to make some changes to your ascx controls.

The answer to your first question is twofold.  To make sure that your controls only submit to their intended buttons, there is an IE-specific solution, as well as a more general solution (I usually make use of both).  For IE, you can set a default button for section of your page by setting the DefaultButton property on an asp:Panel that surrounds your content.  For non-IE, you can use the DotNetNuke.UI.Utilities.ClientAPI.RegisterKeyCapture method (from the DotNetNuke.WebUtility assembly), passing in your asp:Panel from above, the button to submit to, and the key code for enter (13, or System.Windows.forms.Keys.Enter from the System.Windows.forms assembly).

In terms of validators, assign a ValidationGroup to each validator and the submitting button, so that the validation won't "cross-pollinate."

Hope that helps,


Brian Dukes
Engage Software
St. Louis, MO
314.966.4000

The leading provider of DotNetNuke support, training and custom module development.
 
New Post 8/22/2008 5:28 AM
User is offline Jesper Wilfing
33 posts
10th Ranked


Re: Two controls, two postback events. 

Thank you very much!!! I think this is just what I needed to know!! /Jesper

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Two controls, two postback events.
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Icthus Technologies
Building Faith on the Internet
www.icthustech.com
Efficion Consulting
A premier DotNetNuke consulting firm providing complete DNN services including: custom module development, skinning and design, installation and integration services.
www.efficionconsulting.com
DotNetNuke Training by Engage Software
Specializing in customized training, architecture and module solutions for large scale implementations lead by DNN Core Team Member Christopher Hammond.
engagesoftware.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP