views:

9

answers:

1

Hello All,

I am getting an error when I am upadting the product ,the error is coming in the view page .it is "Object reference is not set to an instance of an object". Please tell me why is the error coming.

category_id: <%= Html.TextBox("category_id", Model.category_id ) %> <%= Html.ValidationMessage("category_id", "*") %>

Thankx in advance Ritz

+1  A: 

What product are you referring to? You need to provide more details, along with the code sample that is leading to the problem

Mainly it occurs because you would referencing an object for which an instance has not been set.

For example:

object obj = null; obj.GetHashCode(); // will result in a object reference not set exception

Ngm