Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    May 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    User Unregistration

    Hi,
    Iíve used the createUserWizard to allow users and Iím using the various other login controls around my site. The information goes to the default sql database aspnet.mdf and to the tables aspnet_Membership and aspnet_Users. I was wondering is there was a control or a easy way to unregister? I was thinking if there isnít a control I could grap the username like thisÖ
    Code:
     UserName = Page.User.Identity.Name.ToString()
    Then query the tables for rows that match the username and delete the rows. But then how would I sign the user out once they have unregistered? Is there any code to sign a user out that I could put in a click event with the unregister stuff?

    A bit off topic now but hey. When I type something likeÖ
    Code:
    Private Sub Test()
    End Sub
    Is that called a sub routine? Iíve been using them a lot as itís extremely useful. Any help would be great. Thanks.

  • #2
    New Coder
    Join Date
    Mar 2007
    Posts
    76
    Thanks
    0
    Thanked 0 Times in 0 Posts
    in asp.net you got a lot of functions/methods for the membership class (the one thats used to create users with the asp.net create user wizard...)

    and theres one thats called delete user :P (Membership.DeleteUser())

    as for the subs... a sub is a method that returns nothing, a function on the other hand should return a value. That's the basic difference between subs and functions. In C#, a sub is declared void, while function is declared with the type of variable it returns.

    Code:
    VB.Net:
    public sub test()
    end sub
    C#:
    public void test()
    {}
    
    VB.Net:
    protected function test2() as boolean
    end function
    C#:
    protected boolean test2()
    {}
    hope that was helpful


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •