Wrox Programmer Forums
|
BOOK: Professional ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Professional ASP.NET 4 in C# and VB by Bill Evjen, Scott Hanselman, Devin Rader; ISBN: 9780470502204
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET 4 : in C# and VB 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 9th, 2011, 03:10 PM
Registered User
 
Join Date: Jul 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default ASPNETDB.mdf

Hi, I've read through this books chapters regarding membership, roles, and authentication and I'm having a little problem conceptualizing what I need to do. I'm creating a website with a three month student membership, and on the ninetieth day i would like them to login but get redirected to a renewal into an alumni role with year long memberships. I think I'm looking to call the CreateDate property in the DB and compare it with date.time(now) or something of the like. I would really appreciate a in depth walkthrough of how to code and or implement this. Thank you so much for taking the time to reply hope someone can connect the dots for me. (I almost had an idea with calling strong types from the profileprovider but dont know how to get a createdate in there :) Very Very new to this type of development)
 
Old July 9th, 2011, 03:20 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,

An in-depth walkthrough is a bit too much, but here's a general process description:

1. Create a Profile property of type DateTime
2. Handle the LoggedIn event of the Login control
3. Create an instance of the Profile using Profile.Create and pass in the User Name of the Login control
4. Use DateTime.Compare (http://msdn.microsoft.com/en-us/libr...e.compare.aspx) and see if the user account has expired
5. Redirect if necessary.

You'll find more information and examples of the various events, controls and properties on the MSDN web site.

Hope this helps,

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 User Says Thank You to Imar For This Useful Post:
Chris_Alis (September 12th, 2011)
 
Old July 14th, 2011, 12:59 PM
Registered User
 
Join Date: Jul 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Smile Thank you so much

Hi Imar, I wanted to thank your for a prompt and helpful response. With the road map you supplied I think I'll be able to stumble my way through it now lol. Thanks again
 
Old July 14th, 2011, 01:01 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

You're welcome, and good luck. Feel free to ask follow up questions here in case you get stuck.

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!





Similar Threads
Thread Thread Starter Forum Replies Last Post
about ASPNetDB.mdf bela_sush ASP.NET 3.5 Basics 1 October 18th, 2010 12:14 PM
about ASPNetDB.mdf bela_sush BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 2 October 18th, 2010 10:56 AM
ASPNETDB.mdf again Will BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 2 April 28th, 2009 04:30 PM
ASPNETDB.mdf Will BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 3 April 27th, 2009 01:07 PM
aspnetdb.mdf Jackxxx ASP.NET 2.0 Basics 0 January 9th, 2007 01:37 PM





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