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...DNN Platform (o...DNN Platform (o...CommandButton (DotNetNuke.UI.WebControls) and Validation GroupCommandButton (DotNetNuke.UI.WebControls) and Validation Group
Previous
 
Next
New Post
2/28/2009 12:50 PM
 

Hi,

I wonder how to assign a validation group to a command button, as this is no property, or at least, Intellisense does not show up with this. When adding it in the "HTML" code, the compiler accepts it, but when I'm having a validation summary as well, it does not display the message box  (only the text properties of the validators).

Any help?

Michael


Michael Tobisch
DNN★MVP

dnn-Connect.org - The most vibrant community around the DNN-platform
 
New Post
2/28/2009 4:10 PM
 

If you're using the .Net framework 2.0+, this shouldn't be an issue.  Simply add the ValidationGroup attribute to the submit button.  However, you also need to add it to the form controls and validation controls on the page/module as well. 

So far, I have not had any DNN specific problems using this feature.


Will Strohl

Upendo Ventures Upendo Ventures
DNN experts since 2003
Official provider of the Hotcakes Commerce Cloud and SLA support
 
New Post
3/4/2009 11:02 AM
 

It does not work. I removed all ValidationGroup attributes, and it works. I added them again to any validator, any item that causes validation on auto-postback (DropDownList, CommandButtons) and the ValidationSummary - it just shows the red stars that are the text attributes of the validators. When I set the validation summary's ShowSummary item to true, the error messages are displayed correctly. When I set the ShowMessageBox attribute to true, it does not pop up.

I disabled AJAX - same thing.

I enabled AJAX and disabled the "Supports partial rendering" option on the control's definition - same thing.

Any ideas?

Best wishes
Michael


Michael Tobisch
DNN★MVP

dnn-Connect.org - The most vibrant community around the DNN-platform
 
New Post
5/15/2009 1:12 PM
 

Well,

there is an issue in Gemini about this -  http://support.dotnetnuke.com/issue/ViewIssue.aspx?id=7745&PROJID=2 - but it seems that this will not be solved anymore for DNN 4 - it is solved for DNN 5, anyway.

As I am  writing a module that has to run with DNN 4 as well (for the moment), here is a workaround for those who are interested:

Assume you have a CommandButton with the ID="UpdateButton".

Code behind (C#):

protected voidPage_Init(object sender, EventArgs e)
{
   ...
   this.UpdateButton.Load += new EventHandler(this.UpdateButton_Load);
   ...
}

protected void UpdateButton_Load(object sender, EventArgs e)
{
   CommandButton updateButton = (CommandButton)sender;
   if (DotNetNuke.Common.Assembly.glbAppVersion.StartsWith("04"))
   {
      ImageButton icon = (ImageButton)updateButton.Controls[0];
      LinkButton link = (LinkButton)updateButton.Controls[2];
      icon.ValidationGroup = "EditEventValidationGroup";
      link.ValidationGroup = "EditEventValidationGroup";
   }
}

Happy programming! (as Scott Mitchell would say...)

Michael


Michael Tobisch
DNN★MVP

dnn-Connect.org - The most vibrant community around the DNN-platform
 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...CommandButton (DotNetNuke.UI.WebControls) and Validation GroupCommandButton (DotNetNuke.UI.WebControls) and Validation Group


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