ASP.Net MVC null reference exception with TextArea name

Posted by kingrichard2005 on Stack Overflow See other posts from Stack Overflow or by kingrichard2005
Published on 2010-04-29T21:13:37Z Indexed on 2010/04/29 21:17 UTC
Read the original article Hit count: 264

Filed under:
|

Hello, I have a TextArea html helper method I'm calling in a foreach loop. Basically, when I initially load the View it works fine, but when i reload the View and load postback data, the same TextArea throws a NullReferencException and yet the variable I'm using in the TextArea as the name of the TextArea is not null. I've attached a picture below for demonstration:

alt text

Sorry if it's difficult to see, the blue arrow below is pointing to the variable used to name the TextArea. Again, it works on initial load, but it errors out on postback when the page is reloaded. I'm not sure what's going on.

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about ASP.NET