Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > ASP.NET 4 General Discussion
|
ASP.NET 4 General Discussion For ASP.NET 4 discussions not relating to a specific Wrox book
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 4 General Discussion 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 May 16th, 2010, 03:05 PM
Friend of Wrox
 
Join Date: Mar 2010
Posts: 99
Thanks: 21
Thanked 6 Times in 4 Posts
Default Login controls and memberships features

Hello,

I have reached the chapter 16 in the "Beginning ASP.NET in C# and VB" of Imar. All the info you get from that book is really interesting.. want me to know more lol

Through, while i am reading.. tons of questions come to my head about the login controls. The login controls seem very powerful.. however in many custom scenario you still need to add or extend some features.. such :

1- The LoginName control show the username in the Format String.. but what if you wanna show the first and last name of the person instead ? Like Welcome Firstname Lastname..

2- The same goes with the confirmation mail.. is there a way to customize it more ? the mail seem to use some placeholders such <% Username %> what about i wanna show name and lastname instead ?

3- What if you want the user to add additional information in the sign up form ? however look like some infos can be found at http://weblogs.asp.net/scottgu/archi...18/427754.aspx.. is there way to control, show or even use these data when the user is logged in ?

4- What if i wanna add something else in the login form along with the username and password.. lets say a company field where each company can log-on ? is there a way to detect which company the user selected ?

5- Ive heard about providers... are they used to controls the data ? is there ways to extend a provider or even create a new one so the data can be accessed on our own database instead ?

I am really interrested in the security domain of users and roles management.. however i just don't know where to look at after. If anyone have hints or whatever i would love to heard them about how to extend or customize the login controls or the features.

Thanks. This would be greatly appreciated.

Last edited by Rushino; May 16th, 2010 at 03:11 PM..
 
Old May 17th, 2010, 02:16 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,
Quote:
1- The LoginName control show the username in the Format String.. but what if you wanna show the first and last name of the person instead ? Like Welcome Firstname Lastname..
Check out Chapter 17 as it deals with personalization using Profile. There are no built-in controls to display tthe first and last name, but with Profile you can easily do something like this yourself.

Quote:
2- The same goes with the confirmation mail.. is there a way to customize it more ? the mail seem to use some placeholders such <% Username %> what about i wanna show name and lastname instead ?
You need to do that yourself. Hook into the MailSending event, get hold of the message body and then customize it. Here's an example from the MSDN docs: http://msdn.microsoft.com/en-us/libr...v=VS.100).aspx

Quote:
3- What if you want the user to add additional information in the sign up form ? however look like some infos can be found at http://weblogs.asp.net/scottgu/archi...18/427754.aspx.. is there way to control, show or even use these data when the user is logged in ?
Again, Profile may be the answer here. Scott's article should put you on the right track once you understand Profile.

Quote:
4- What if i wanna add something else in the login form along with the username and password.. lets say a company field where each company can log-on ? is there a way to detect which company the user selected ?
You can customize the Login template (like Scott does with the CreateUserWizard IIRC), add additional controls, handle the LoggedIn event and then read access your controls and do whatever you see fit with it.

Quote:
5- Ive heard about providers... are they used to controls the data ? is there ways to extend a provider or even create a new one so the data can be accessed on our own database instead ?
Yes, as explained in the book, they provide the layer between the APIs in ASP.NET and the database, abstracting away the actual implementation. Take a look here for some ideas: http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=404

Quote:
I am really interrested in the security domain of users and roles management.. however i just don't know where to look at after. If anyone have hints or whatever i would love to heard them about how to extend or customize the login controls or the features.
You may want to check out this book: http://www.wrox.com/WileyCDA/WroxTit...764596985.html It doesn't show you directly how to customize each of the Login controls in depth but gives you a solid background in the security mechanisms and available providers which will make it easier to customize things yourself.

Cheers,

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!
The Following 2 Users Say Thank You to Imar For This Useful Post:
Rushino (May 17th, 2010)
 
Old May 17th, 2010, 08:33 AM
Friend of Wrox
 
Join Date: Mar 2010
Posts: 99
Thanks: 21
Thanked 6 Times in 4 Posts
Default

At least there are many solutions available. This is because in PHP even if you had to code everything this was rather easy to implement such scenarios. But thanks a lots for your post. That will greatly help.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Login controls : Way to customize them ? Rushino BOOK: Beginning ASP.NET 4 : in C# and VB 2 May 15th, 2010 01:07 PM
Problem regarding Login controls bond007 ASP.NET 2.0 Basics 1 April 16th, 2009 01:14 AM
Adding Client-Side Features to Server Controls barkerl ASP.NET 2.0 Professional 2 February 22nd, 2009 01:44 PM
Login Controls mashype ASP.NET 3.5 Basics 4 January 26th, 2009 03:07 PM
Which SMTP server for login and other controls? tobe ASP.NET 2.0 Basics 0 November 30th, 2007 07:02 PM





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