This can be done using a special hack, for example, the one I used in this article:
Typed Relay in ASP.NET
However, I would not recommend doing this just for convenience in simple cases, as the result would be more complex than what you are trying to improve.
source
share