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  |  

AppTheory specializes in solutions based on the DotNetNuke platform and has 2 employees on the DotNetNuke Core Team.
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
 


  Sponsors  

Meet Our Sponsors

Salaro -- Skins and more
OnyakTech
The best choice for your web site host, email hosting, and domain registration.
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.
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Custom validation for a custom profile field
Previous Previous
 
Next Next
New Post 4/25/2008 11:25 AM
Unresolved
User is offline Joshua Beall
90 posts
www.hslda.org
10th Ranked


Custom validation for a custom profile field 

Hello everyone,

I have a custom profile field, "ConstituentID", and I want to do custom validation on that field when the user updates their profile.  I'm not talking about making sure that it's a certain number of digits and so forth -- I need to call a web service to check to see if the number is valid.  So I need to do this in code somewhere.

I'm not sure exactly how to do this.  Can someone give me some pointers?

  -Josh

 
New Post 4/25/2008 1:28 PM
User is offline Joshua Beall
90 posts
www.hslda.org
10th Ranked


Re: Custom validation for a custom profile field 

After some digging, I've figured a few things out but I'm still not really sure how to proceed.  Here's what I've figured out:

  • I can write a custom profile provider, and check that the ConstituentID is valid before saving it.  This is good for data integrity and a necessary step, however, the only way to notify the calling code that the constituent ID is invalid is by throwing an exception.  This doesn't make for good UI design.  I want an error message on the form field, not a nasty red message that says "A critical error has occured!" and kicks them out of the form.
  • I can edit the admin/Users/Profile.ascx and Profile.ascx.vb file and do custom form validation in there, but that file is going to get overwritten the next time I upgrade DNN.  So I'd rather not do that.

Suggestions?

  -Josh

 
New Post 5/6/2008 7:39 AM
User is offline Joshua Beall
90 posts
www.hslda.org
10th Ranked


Re: Custom validation for a custom profile field 

I've modified the various ascx and .ascx.vb files to do the validation I need... but I'm still hoping there's a better way to do this.  I don't want to have to put my changes back in every time I upgrade (especially with the speed at which DNN puts out new releases).

  -Josh

 
New Post 6/11/2008 6:12 AM
User is offline Joshua Beall
90 posts
www.hslda.org
10th Ranked


Re: Custom validation for a custom profile field 

Any suggestions on this?

 
New Post 6/20/2008 1:38 PM
User is offline Joshua Beall
90 posts
www.hslda.org
10th Ranked


Re: Custom validation for a custom profile field 

The solution I'm using (modified the UserControls directly) is also a very bad solution because it messes with the way that admins add new users.  Now that I've got custom validation that checks for a valid profile on user creation, admins cannot create a new user!  This is because on the admin's "Add New User" page, it does not show them the profile, and I am checking for a valid profile before letting them add a user.

So, how do I get custom validation on a profile field without these hackish workarounds?  Anyone have a suggestion?

  -Josh

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Custom validation for a custom profile field
 


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.

 


Code Endeavors, LLC
Do you Endeavor to Enhance your DotNetNuke designs by utilizing AJAX technologies to more efficient interactive web experiences
www.codeendeavors.com
T-WORX, INC.
Professional DotNetNuke Solutions
www.t-worx.com
AppTheory
Professional development for medium to large projects based on the DotNetNuke platform.
www.apptheory.com

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