Click here to Skip to main content
15,896,201 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi.
I have a project,where it will display the username of the current logged in user (loginname control) after user login.
In that project,i have own custom data which allows users to enter some information that will be stored in my custom database.
Along with the other information i also want the login name control to store the content ie the User's name, to my custom database.

Any ideas guys?
Posted
Comments
AspDotNetDev 1-Sep-10 1:19am    
I didn't see a problem in your post. What issue are you having that you need us to help with? Do you not know how to use databases? Do you not know how to extract data from the webpage? Are you getting an exception at runtime? A compilation error? You need to be more specific.
pwtc222 1-Sep-10 3:00am    
the question is,how to store loginname value into database with a button click.

1 solution

Hi.

I'm pretty sure you might get some nice ideas while reading about
Asp.Net Profile Provider and Membership Provider. To make them working with you custom logic and custom Db structure, all you need is create your custom implementation of them.

Most probably overriding Membership provider will be already enough for your purposes...
 
Share this answer
 
Comments
pwtc222 1-Sep-10 2:59am    
can you explain more?
alexey.nayda 1-Sep-10 3:11am    
If you need only loginname to be stored somewhere else than default membership datatable and you don't want to mess with customizing new MembershipProvider class, then you can have quick and dirty solution.
Find in your Db in stored procedures the following one "aspnet_Membership_CreateUser". It's the one that executed by standard SqlMembershipProvider. Add few lines you need and that's it.
Of course it is only in case you are using default SqlMembershipProvider.
pwtc222 1-Sep-10 21:14pm    
how do i suppose to do that..i'm seeking guidance for that

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900