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  |  

telerik -- supercharge your DNN websites
  Ads  
Aspose - The .NET & Java component publisher
 


  Sponsors  

Meet Our Sponsors

WebSecureStores -- ASP.NET & DotNetNuke Hosting Solutions
FCKeditor Project
Salaro -- Skins and more
OnyakTech
The best choice for your web site host, email hosting, and domain registration.
CrystalTech Web Hosting™
 


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
476 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.

 


SSL Enabled and Amazingly FAST...
SSL enable your DNN web site with SSLRedirect, compress your DNN web site HTTP data flow by up to 75%-90% with HttpCompressionAgent, and monitor your DNN web site's performance with WebKeepAlive...
www.sanibellogic.com
Ultra Media Gallery & Video Gallery
The most popular photo gallery and video gallery module. with Flash interface.
www.bizmodules.net
WDK Solutions
Quality modules for the DotNetNuke community. Check out our 'wild' modules!
wdkns.com

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