在mvc3 razor databasefirst中下载
问题描述:
大家好,
我正在做Mvc3 razor数据库第一次应用程序我正在为国家和州做Dropdowncascading实际上我正在关注这个例子
http://www.c-sharpcorner.com/uploadfile/2124ae/cascading-dropdown-list-in-asp-net-mvc- 2-using-jquery /
但我收到的错误如对象引用未设置为对象实例。
任何人都可以帮我Plzzzzzz。
谢谢,
Hi all,
I am doing Mvc3 razor database first application in this i am doing Dropdowncascading for countries and states actually i am following this example
http://www.c-sharpcorner.com/uploadfile/2124ae/cascading-dropdown-list-in-asp-net-mvc-2-using-jquery/
but i am getting errors like "Object reference not set to an instance of object".
Can anyone help me Plzzzzzz.
Thanks,
答
对象引用未设置为对象的实例
当您尝试使用属性或调用null对象的方法时,会发生此错误。更多细节:此处 [ ^ ]
Visual Studio DEBUGGER的简单使用可以告诉你对象因为它正在发生。只需查看堆栈跟踪并将调试器放在该行上即可。检查该行的对象,看看是否有任何一个为null,并且您正在尝试使用该对象属性。处理相同。
Object reference not set to an instance of an object
This error happens when you try to use a property or call a method of an object that is null. More details: here[^]
A simple use of Visual studio DEBUGGER can tell you the object because of which it is happening. Just look at the stack trace and put a debugger on that line. Check the objects of that line and see if any one is null and you are trying to use that objects property. Handle the same.