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: 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 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
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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)
  #2 (permalink)  
Old July 9th, 2011, 03:20 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

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)
  #3 (permalink)  
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
  #4 (permalink)  
Old July 14th, 2011, 01:01 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

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!
 


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
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



All times are GMT -4. The time now is 12:37 PM.


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