I am trying to set a property of my .ascx controls from an .aspx using that control.
So in one of my .aspx which has this control in it, I have the
For others who might come here from Googling the error:
Sometimes it's because you didn't finish writing a line but it compiles anyway and the error only shows up on the next line which can be confusing/misleading if you don't pay attention. Eg:
var foo = 33;
var bar =
// Note that I never finished the assignation (got distracted, saved and it compiled)
//
// Some unrelated code returning "void" (another example would be List.Add)
await SomethingAsync(); // -> Error shows up here instead
Might save some of you all some headache trying to figure why "awaiting on my function" raises a "Cannot convert void to X", when really it's not the actual issue.