Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
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 May 1st, 2008, 06:41 PM
Authorized User
 
Join Date: Apr 2008
Location: , , .
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Default Ch 15 - Security

Hi,

I was wondering, for the login-in control, if you want additional information from the user to login, how does it work? How does the control hook up to additional textboxes?

Can you provide some insight?

Best,
ASPC

 
Old May 2nd, 2008, 02:55 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

You can customize the WizardSteps (or create new ones), add the necessary controls to them and save the additional data in Profile when the user is created. Scott Guthrie has written an excellent tutorial on this subject that shows you exactly how to do this:
http://weblogs.asp.net/scottgu/archi...18/427754.aspx

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
 
Old May 2nd, 2008, 10:28 AM
Authorized User
 
Join Date: Apr 2008
Location: , , .
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Imar,

Thanks for the link. How does ASP.NET know to connect say the new textboxes for a wizard step to the user account? Do you have to go into the asp_users table and add new settings?

I'm used to writing custom solutions with php so this is way new for me :)


 
Old May 2nd, 2008, 11:13 AM
Authorized User
 
Join Date: Apr 2008
Location: , , .
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I guess what I'm saying is for more complicated situations, what the user registration and login controls offer out of the box might not be sufficient enough for my needs. Am I talking about the membership-provider? I'm a bit overwhelmed as this is way different from what I'm used to (but its also way better than what im used to :)

 
Old May 2nd, 2008, 02:25 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Not sure what you're asking. WHat kind of data / text boxes are you talking about?

You could convert the <asp:Login /> to a template so you can alter its underlying HTML (there's an option to do this on its Smart Tasks panel). Then you can access these controls in the various events that the Login control fires. You'll need to use FindControl to find your custom controls in the template.

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
 
Old May 2nd, 2008, 02:43 PM
Authorized User
 
Join Date: Apr 2008
Location: , , .
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Say I drag a login control onto the page and then it shows a username and password textbox right? Say i want to have an additional textbox for the user to supply additional information to login..

How would I connect that additional textbox to the login control so that it validates that textbox as well? do i have to change something in the database ?

 
Old May 2nd, 2008, 03:05 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Did you see my previous reply? Did you convert the Login control to a template? That should give you the answer, doesn't it?

If not, please provide more information about what you're trying to accomplish and what you need the additional controls for.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
 
Old May 3rd, 2008, 02:55 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Once you convert the login control to a template you can put anything in it as you would on a regular page. You can add validators as necessary. I'm not sure what the answer is to the question of how you hook added controls to the underlying data. I believe you would add code to the login event handlers and then deal with your particular data before or after the login process.

-Peter
peterlanoie.blog




Similar Threads
Thread Thread Starter Forum Replies Last Post
CH 15 AddBid.ASP rauf BOOK: Beginning ASP 3.0 1 November 11th, 2008 01:51 PM
CH 15: Highlighting Elements Razzy The Pug BOOK: Ivor Horton's Beginning Visual C++ 2005 1 November 9th, 2008 09:39 PM
CH.15 NEED HELP stacy BOOK: Beginning ASP 3.0 1 January 21st, 2004 03:37 AM
Professional C# Second Edition Ch 15 Mike Smith BOOK: Professional C#, 2nd and 3rd Editions 0 January 5th, 2004 09:45 AM





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