Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 14th, 2006, 04:52 AM
Registered User
 
Join Date: Sep 2006
Location: , , .
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
Reply With Quote
  #2 (permalink)  
Old September 15th, 2006, 06:28 AM
Authorized User
 
Join Date: Sep 2006
Location: Bangalore, Karnataka, India.
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
Reply With Quote
  #3 (permalink)  
Old September 15th, 2006, 07:24 AM
Imar's Avatar
Wrox Author
Points: 72,022, Level: 100
Points: 72,022, Level: 100 Points: 72,022, Level: 100 Points: 72,022, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,076
Thanks: 80
Thanked 1,587 Times in 1,563 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?
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 07:50 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.