开发者

Beginning ASP.NET. using login name as sql parameter

开发者 https://www.devze.com 2023-03-18 10:30 出处:网络
Does anyone have some code or a link as to how to create the user login name as a parameter during a sql query in ASP.NET?

Does anyone have some code or a link as to how to create the user login name as a parameter during a sql query in ASP.NET?

Basically I want to use the default membership structure with a new field ClubID, then I want to add a new table called aspnet_Clubs which contains things such a开发者_开发问答s Club Name, stadium name, Balance etc etc... and then use a relationship between ClubID and a field in the aspnet_Clubs table to tie things together.

Then when each user logs in they should see the clubs information specific to their loginID.

I know the syntax to use for the query, its getting the loginname parameter and being able to use/assign it as part of the search that is causing me the problem.


In general it is not recommended to break the default schema of the aspnetdb where the Membership data is stored. It can bring you to unexpected consequences in the future.

I had a similar question a couple of days ago, please check it here, may be you will be able to adopt something from the discussion to your situation.

0

精彩评论

暂无评论...
验证码 换一张
取 消