Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | 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 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 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

Reply With Quote
  #2 (permalink)  
Old May 2nd, 2008, 02:55 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 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.
Reply With Quote
  #3 (permalink)  
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 :)


Reply With Quote
  #4 (permalink)  
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 :)

Reply With Quote
  #5 (permalink)  
Old May 2nd, 2008, 02:25 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 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.
Reply With Quote
  #6 (permalink)  
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 ?

Reply With Quote
  #7 (permalink)  
Old May 2nd, 2008, 03:05 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 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.
Reply With Quote
  #8 (permalink)  
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
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
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



All times are GMT -4. The time now is 02:19 AM.


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