|
|
 |
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
 | This is the forum to discuss the Wrox book ASP.NET 2.0 Instant Results by Imar Spaanjaars, Paul Wilton, Shawn Livermore; ISBN: 9780471749516 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|
 |

October 16th, 2006, 11:20 AM
|
|
Authorized User
|
|
Join Date: May 2005
Location: Manchester, , United Kingdom.
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Roles
Chapter 9
Hi,
Is it possible that when creating or editing a user, to force them to be inserted into a certain role that I have set up for general users?
Thanks
|

October 16th, 2006, 04:28 PM
|
 |
Wrox Author
Points: 33,563, Level: 80 |
|
|
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 10,231
Thanks: 7
Thanked 203 Times in 201 Posts
|
|
Hi jackandjo,
Yes, that's possible and it's pretty easy to do.
You can assign a user to a role with the follow code (in the CreatedUser event for example)
Protected Sub CreateUserWizard1_CreatedUser(ByVal sender As Object,
ByVal e As System.EventArgs)
Handles CreateUserWizard1.CreatedUser
Roles.AddUserToRole(CreateUserWizard1.UserName, "Your Role Name")
End Sub
Hope this helps,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
|

October 17th, 2006, 04:12 AM
|
|
Authorized User
|
|
Join Date: May 2005
Location: Manchester, , United Kingdom.
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Cheers
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |