kamagra how much to take

MembersipCreateStatus Switch/Case with Undefined Actions

The code itself is pretty self explanatory and is very unamazing. Taking the values that are available from the System.Web.Security.MembershipCreateStatus enumeration that specifies the result of the CreateUser operation, here is a switch/case to go through all of them to save you some time when testing the result. Honestly, I just got tired of writing it and wanted a place where I could reference it :) but it might save some people some time I suppose.

  1. public static void GetStatusResult(MembershipCreateStatus status)
  2. {
  3. switch (status)
  4. {
  5. case MembershipCreateStatus.DuplicateEmail:
  6. //
  7. break;
  8. case MembershipCreateStatus.DuplicateProviderUserKey:
  9. //
  10. break;
  11. case MembershipCreateStatus.DuplicateUserName:
  12. //
  13. break;
  14. case MembershipCreateStatus.InvalidAnswer:
  15. //
  16. break;
  17. case MembershipCreateStatus.InvalidEmail:
  18. //
  19. break;
  20. case MembershipCreateStatus.InvalidPassword:
  21. //
  22. break;
  23. case MembershipCreateStatus.InvalidProviderUserKey:
  24. //
  25. break;
  26. case MembershipCreateStatus.InvalidQuestion:
  27. //
  28. break;
  29. case MembershipCreateStatus.InvalidUserName:
  30. //
  31. break;
  32. case MembershipCreateStatus.ProviderError:
  33. //
  34. break;
  35. case MembershipCreateStatus.Success:
  36. //
  37. break;
  38. case MembershipCreateStatus.UserRejected:
  39. //
  40. break;
  41. }
  42. }
Share

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>