Using UserControl.RenderControl()
Perhaps you want to reuse a usercontrol in a email? or you need to generate the html from a usercontrol for a specific purpose? Firstly, here is the code to render the html from a user control to a string builder object: Dim sb As New StringBuilder() Using sw As New StringWriter(sb) [...]
Unable to cast object of type ‘ Issue
I came across this error: System.InvalidCastException: Unable to cast object of type ‘<TakeIterator>d__3a`1[Class]‘ to type ‘System.Collections.Generic.List`1[Class]‘. This occured when trying to use the Take extension (list.Take(n)) from a generic list of objects. The problem is when you use the Take extension, it returns a new sequence ( IEnumerable). I got around this issue by using: [...]


