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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Custom validation for a custom profile fieldCustom validation for a custom profile field
Previous
 
Next
New Post
4/25/2008 2:25 PM
 

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 4:28 PM
 

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 10:39 AM
 

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 9:12 AM
 

Any suggestions on this?

 
New Post
6/20/2008 4:38 PM
 

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
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Custom validation for a custom profile fieldCustom validation for a custom profile field


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