 |
BOOK: Beginning ASP.NET 4 : in C# and VB
 | This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning 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
|
|
|
|
|

August 24th, 2011, 04:42 PM
|
|
Authorized User
|
|
Join Date: Jun 2011
Posts: 45
Thanks: 2
Thanked 0 Times in 0 Posts
|
|
Chap 14 - pg 517 - Item 9 (Object reference not set to an instance of an object. )
Hi Imar,
I'm having trouble after I insert a new name for the NewPhotoAblum.aspx.
Here is part of the error msg:
Server Error in '/Site' Application.
-------------------------------------------------------------------------
Object reference not set to an instance of an object.
[NullReferenceException: Object reference not set to an instance of an object.]
_NewPhotoAlbum.EntityDataSource1_Inserted(Object sender, EntityDataSourceChangedEventArgs e) +61
System.Web.UI.WebControls.EntityDataSourceView.OnI nserted(EntityDataSourceChangedEventArgs e) +112
System.Web.UI.WebControls.EntityDataSourceView.Exe cuteInsert(IDictionary values) +521
System.Web.UI.DataSourceView.Insert(IDictionary values, DataSourceViewOperationCallback callback) +89
System.Web.UI.WebControls.DetailsView.HandleInsert (String commandArg, Boolean causesValidation) +379
System.Web.UI.WebControls.DetailsView.HandleEvent( EventArgs e, Boolean causesValidation, String validationGroup) +611
System.Web.UI.WebControls.DetailsView.OnBubbleEven t(Object source, EventArgs e) +95
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
System.Web.UI.WebControls.DetailsViewRow.OnBubbleE vent(Object source, EventArgs e) +112
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
System.Web.UI.WebControls.LinkButton.OnCommand(Com mandEventArgs e) +125
System.Web.UI.WebControls.LinkButton.RaisePostBack Event(String eventArgument) +169
System.Web.UI.WebControls.LinkButton.System.Web.UI .IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +9
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +176
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563
I have copied all of your source code from Chap 14 to the Site folder/directory and nothing I've done resolves this error............
Can you suggest something for me to read or try?
Thanks,
|
|

August 24th, 2011, 06:06 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi there,
AFAIK, that exercise doesn't change the Inserted event (mentioned in the error message), so maybe you accidentally changed something you shouldn't have? Also, the exercise deals with the Manage page, not the New page. Maybe that helps in finding the issue?
If that doesn't help, can you post the relevant code for your pages?
A final thing to check: the database. Make sure you set up the correct tables, columns and primary keys before you create the EF model. If you need to make changes to the database, make sure to recreate the EF model.
Hope this helps,
Imar
|
|

August 24th, 2011, 07:28 PM
|
|
Authorized User
|
|
Join Date: Jun 2011
Posts: 45
Thanks: 2
Thanked 0 Times in 0 Posts
|
|
What does AFAIK mean?
Hi There,
What does AFAIK mean?
|
|

August 25th, 2011, 03:03 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
|
|

August 25th, 2011, 07:59 AM
|
|
Authorized User
|
|
Join Date: Jun 2011
Posts: 45
Thanks: 2
Thanked 0 Times in 0 Posts
|
|
Acronymons
Imar, You don't like CAPITAL LETTERS, I don't like acronynoms, especially if I have look up the definition.
I'm trying to learn vb.net, that's difficult enough.
If you really cared about the people who purchase your books, you should make it as easy as possible for them.
Cheers
|
|

August 25th, 2011, 08:50 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Sorry? I think I gave you a detailed answer with enough info to figure out what's going on and troubleshoot the problem. In my opinion (although I would have peferred to write IMO) that acronynom didn't really confuse the rest of the message. On top of of that, it's quite a common forum acronynom.
But sorry if I confused you. if you're so touchy, I better not answer other questions from you though.... ;-)
Quote:
|
If you really cared about the people who purchase your books
|
Don't I?
Imar
|
|
 |
|