System.ArgumentNullException: Value cannot be null. (Parameter 's')
I wanted to create a new card view inserting images, names and review text etc as per short video attached.
The card view is not created but showed an exception instead:
`
And this exception seems to point this part in controller
`
I have no idea why it gets null. Any insights highly appreciated.
My full code for your reference https://pastesio.com/title-8921
Pastesio.com
title - Pastesio.com
2 Replies
I saw that code file.. actually its an exception,thus we should check for values , my suggestion is...add a debug point before:
at line 4..where '{' method starts and arguments have values..
or
at this line..
byte[] bytesListingImageName = Encoding.ASCII.GetBytes(obModel.ListingImgName);
Looks like your model is not binding to the request as you expect it to. For one, you're not referencing the property
ListingImgName
in the BindAttribute.Included
list (in the constructor).
I assume ASP is thus simply ignoring the property when binding.