Wrox Programmer Forums
|
BOOK: ASP.NET MVC Website Programming Problem Design Solution ISBN: 9780470410950
This is the forum to discuss the Wrox book ASP.NET MVC Website Programming Problem Design Solution by Nicholas Berardi, Al Katawazi, and Marco Bellinaso; ISBN: 9780470410950
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET MVC Website Programming Problem Design Solution ISBN: 9780470410950 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 December 19th, 2009, 08:12 PM
Authorized User
 
Join Date: Dec 2009
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Default Problems with profileInformation

In my ActionResult UserProfile(), among other things, I create a new instance of ProfileInformation,

Code:
ProfileInformation profileInformation = new ProfileInformation()
{
FirstName = ProfileBase.GetPropertyValue("PersonalInformation.FirstName").ToString(),
LastName = profileBase.GetPropertyValue("PersonalInformation.LastName").ToString(),
Gender = profileBase.GetPropertyValue("PersonalInformation.Gender").ToString(),
BirthDate = (DateTime)profileBase.GetPropertyValue("PersonalInformation.BirthDate"),
Occupation = profileBase.GetPropertyValue("PersonalInformation.Occupation").ToString(),
Country = profileBase.GetPropertyValue("PersonalInformation.Country").ToString(),
Website = profileBase.GetPropertyValue("PersonalInformation.Website").ToString(),
            };
However, while debugging I get "System.InvalidCastException was unhandled by user code"

I can't figure out why, what the cause is for this exception?





Similar Threads
Thread Thread Starter Forum Replies Last Post
problems baku C++ Programming 0 October 5th, 2007 11:30 AM
having problems in for each.. abhishek verma XSLT 1 January 24th, 2006 05:29 AM
validate.asp problems and logon.asp problems p2ptolu Classic ASP Databases 0 February 16th, 2005 02:34 PM
ie problems cat CSS Cascading Style Sheets 1 October 27th, 2004 10:46 PM
Two Problems goraya C# 2 May 21st, 2004 05:54 AM





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