Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 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 July 20th, 2009, 03:57 PM
Authorized User
 
Join Date: Jun 2009
Posts: 87
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem in role

Thanks for your book.

I want to create an account in 'Managers' role from the browser. Please give me a solution.
 
Old July 20th, 2009, 04:00 PM
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 am not sure I understand what you want. Can you elaborate please?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old July 20th, 2009, 04:19 PM
Authorized User
 
Join Date: Jun 2009
Posts: 87
Thanks: 0
Thanked 0 Times in 0 Posts
Default Role problem

We create users in 'Managers' role with the help of Website Administrator Tool. I want to create an account in 'Managers' role but from the browser.. How can I do it.
 
Old July 20th, 2009, 04:23 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Maybe this helps?

http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=472

You probably need something like

if (!Roles.IsUserInRole(adminUserName, adminRoleName))
{
Roles.AddUserToRole(adminUserName, adminRoleName);
}

in the CreateUserWizard's CreatedUser event.

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old July 20th, 2009, 04:27 PM
Authorized User
 
Join Date: Jun 2009
Posts: 87
Thanks: 0
Thanked 0 Times in 0 Posts
Default Role problem

Thanks..I will try this code..If I get some problem..I will inform you..Thanks a lot..





Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with sitemap and role hertendreef ASP.NET 2.0 Basics 6 June 21st, 2007 05:22 PM
problem with accessibility and role hertendreef ASP.NET 2.0 Professional 1 June 19th, 2007 09:46 AM
problem with role based authorization hotshot_21 ASP.NET 1.0 and 1.1 Basics 0 February 21st, 2006 08:12 AM
Problem with Edit Role Clarke76 BOOK: ASP.NET Website Programming Problem-Design-Solution 3 January 17th, 2005 01:15 PM
Role Count Walden SQL Server 2000 1 June 9th, 2003 12:19 PM





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