tags:

views:

245

answers:

1

I have a View page which displays a dropdownlist and search button..when i click the search button it renders the data..even when i debug i can go to the action in controller..but when i press the button second time it throws this error anbd doesnt allow me to debug..i set breakpoint but no luck..any ideas?

Server Error in '/' Application. Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.] System.Web.Mvc.DefaultModelBinder.UpdateCollection(ModelBindingContext bindingContext, Type itemType) +784 System.Web.Mvc.DefaultModelBinder.BindModelCore(ModelBindingContext bindingContext) +647 System.Web.Mvc.DefaultModelBinder.CreateArray(ModelBindingContext bindingContext, Type elementType) +343 System.Web.Mvc.DefaultModelBinder.BindModel(ModelBindingContext bindingContext) +738 System.Web.Mvc.ControllerActionInvoker.GetParameterValue(ParameterInfo parameterInfo) +355 System.Web.Mvc.ControllerActionInvoker.GetParameterValues(MethodInfo methodInfo) +439 System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +288 System.Web.Mvc.Controller.ExecuteCore() +180 System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +96 System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +36 System.Web.Mvc.MvcHandler.ProcessRequest(HttpContextBase httpContext) +377 System.Web.Mvc.MvcHandler.ProcessRequest(HttpContext httpContext) +71 System.Web.Mvc.MvcHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext httpContext) +36 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

+1  A: 

Check this out, it could be the same problem.

rodbv