Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 14th, 2006, 04:52 AM
Registered User
 
Join Date: Sep 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Roles and membership asp.net 2

hi

i have my whole database and also have tables for user login etc. Now i want to use my tables not the tables generated by aspnet_regsql for roles and membership. its client requirement that i must use tables he has provided me. he has two different tables, one for end users and one for admins. and he dont want it to be changed. Is there any way i can use these tables and implement .net 2 feature of memberships and roles.

please help.

thanks in advance
 
Old September 15th, 2006, 06:28 AM
Authorized User
 
Join Date: Sep 2006
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
Are you trying to write the membership and roles by hard-coding or do you want to go about it by using the built in controls. In either case you can decide not to use the system generated tables, and use your tables. However if you are using the built in controls of login etc, you will need to convert them to a template using "convert to template" option, which would make the login form break up into textboxes and labels and command buttons, which can have your own code.

So when you do thats its just like you are using the design of login control but will need to write the full code to access the tables designed by you and do the validation controls of membership.

Vincent Thomas
Bangalore
 
Old September 15th, 2006, 07:24 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

I don't think that what Vincent is saying is entirely true. You don't need to convert controls to templated controls to be able to change the logic of them. These controls expose many interesting events that you can use to perform your own logic.

In addition you could also write your own membership provider. It's not as hard as it sounds. You may want to look here: http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=380 to get some ideas.

Alternatively, if your data structure is similar to the .NET structure, you might get away with changing the ASP.NET stored procedures only. You can have the procedures target your tables, instead of the aspnet* tables.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
While typing this post, I was listening to: Digital by Joy Division (Track 1 from the album: Heart And Soul (CD 1)) What's This?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Membership and Roles doesnt work Baby_programmer ASP.NET 2.0 Professional 2 July 29th, 2008 09:41 AM
ASP.NET Membership and ActiveDirectory Quick209 ASP.NET 2.0 Professional 0 June 13th, 2007 12:41 PM
Help with ASP.NET Membership VerbatimBOT SQL Server 2000 6 May 2nd, 2007 01:58 PM
Roles and membership asp.net 2 zeeshannasir ASP.NET 1.x and 2.0 Application Design 1 September 22nd, 2006 03:34 AM
Retrieving Roles using C# / ADSI in ASP.Net app Prashant.k.m ASP.NET 1.0 and 1.1 Professional 0 October 4th, 2005 04:28 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.