create userwizard and userid aspnet_users in ASPNETDB.MDF and table1 in ASPNETDB:MDF :)

Last post 05-17-2008 8:52 AM by oguzkaygun. 22 replies.

Sort Posts:

  • Re: create userwizard and userid aspnet_users in ASPNETDB.MDF and table1 in ASPNETDB:MDF :)

    05-16-2008, 3:40 PM

    Then put the username into a session on login:

    Session("usernamen") = login1.Username

    Then it doesn't matter from or how you access your default2.aspx. There you just readout the session to get the user:

     Dim yourUser as Membershipuser = Membership.GetUser(Session("username"),True)

    Please: Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post solved your issue.
  • Re: create userwizard and userid aspnet_users in ASPNETDB.MDF and table1 in ASPNETDB:MDF :)

    05-16-2008, 4:07 PM

    hi

    i have problem again :)

    i have added code.. it is below.. and it works.. but it is work for one user... new problem is when second user login, button1(insert button) work for second user... also first user click button1, see email and username of seconduser . but first user should see email and username of first user....i open two exploerer and i have tryed it.. but this code Dim yourUser As MembershipUser = Membership.GetUser(Request.QueryString("user"), True) work for each user... first user see email and username of first user .. also second user see email and username of second user in the same time. but session ("username") doesnt work same time for each user... it shows username and email of last user login :)

    Protected Sub Login1_Authenticate(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.AuthenticateEventArgs) Handles Login1.Authenticate

    'Response.Redirect(String.Format("default.aspx?user={0}", Login1.UserName))

    Session("username") = Login1.UserName

    End Sub

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click

    'TextBox4.Text = Membership.GetUser(LoginStatus1.UniqueID).ToString

    ' TextBox4.Text = User.Identity.IsAuthenticated.

    If Request.QueryString Is Nothing Then

    Exit Sub

    End If

    Dim yourUser As MembershipUser = Membership.GetUser(Session("username").ToString, True)

    Dim userGuid As System.Guid = DirectCast(yourUser.ProviderUserKey, Guid)

    TextBox4.Text = Convert.ToString(userGuid)

    TextBox5.Text = yourUser.UserName

    TextBox6.Text = yourUser.Email

    End Sub

    Mark as me if my question or my answer can be helpful for you :)
  • Re: create userwizard and userid aspnet_users in ASPNETDB.MDF and table1 in ASPNETDB:MDF :)

    05-16-2008, 4:09 PM

    You can use Application("user") if you want to try that. Maybe this works for you

     

    Please: Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post solved your issue.
  • Re: create userwizard and userid aspnet_users in ASPNETDB.MDF and table1 in ASPNETDB:MDF :)

    05-16-2008, 4:17 PM

    hi 

    application ("username") work like session ("username") :)

    i see email and username of last user login :)

    Mark as me if my question or my answer can be helpful for you :)
  • Re: create userwizard and userid aspnet_users in ASPNETDB.MDF and table1 in ASPNETDB:MDF :)

    05-16-2008, 4:27 PM

    Last idea I have is to use a cookie and check this one each time 

    Please: Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post solved your issue.
  • Re: create userwizard and userid aspnet_users in ASPNETDB.MDF and table1 in ASPNETDB:MDF :)

    05-16-2008, 4:31 PM

    cookie ?? what is it ?? could you write to me how i check cookie ? :)

    Mark as me if my question or my answer can be helpful for you :)
  • Re: create userwizard and userid aspnet_users in ASPNETDB.MDF and table1 in ASPNETDB:MDF :)

    05-17-2008, 7:33 AM

    cookies are small files which are saved on the client machine. Their you save for examples your password files to automatically login your page.

    So how to set and read them:

    http://www.startvbdotnet.com/aspsite/forms/cookies.aspx 

    Please: Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post solved your issue.
  • Re: create userwizard and userid aspnet_users in ASPNETDB.MDF and table1 in ASPNETDB:MDF :)

    05-17-2008, 8:52 AM

     

    i think that it can be with loginname1 :) but how ???
    Mark as me if my question or my answer can be helpful for you :)
Page 2 of 2 (23 items) < Previous 1 2