B
Blaz Ziherl
Hi,
I am developing an application in VisualBasic .NET and got the
following error:
"An unhandled exception of type 'System.InvalidCastException' occurred
in microsoft.visualbasic.dll
Additional information: Argument 1 to method 'Control.RenderControl'
has type 'HtmlTextWriter' and cannot be converted to
'HtmlTextWriter'."
I am a newby to .NET, but this sounds a bit stupid to me. However, I
am also posting problematic part of the code where the error occurs:
Dim targetObj As New Object()
Dim sw As New StringWriter()
Dim tw As New System.Web.UI.HtmlTextWriter(sw)
targetObj = a.CreateInstance(aT.FullName)
targetObj.RenderControl(tw) <--- here's the problem!
MsgBox(sw.ToString())
Hopefuly someone will have an idea what's wrong.
Blaz Ziherl
(e-mail address removed)
I am developing an application in VisualBasic .NET and got the
following error:
"An unhandled exception of type 'System.InvalidCastException' occurred
in microsoft.visualbasic.dll
Additional information: Argument 1 to method 'Control.RenderControl'
has type 'HtmlTextWriter' and cannot be converted to
'HtmlTextWriter'."
I am a newby to .NET, but this sounds a bit stupid to me. However, I
am also posting problematic part of the code where the error occurs:
Dim targetObj As New Object()
Dim sw As New StringWriter()
Dim tw As New System.Web.UI.HtmlTextWriter(sw)
targetObj = a.CreateInstance(aT.FullName)
targetObj.RenderControl(tw) <--- here's the problem!
MsgBox(sw.ToString())
Hopefuly someone will have an idea what's wrong.
Blaz Ziherl
(e-mail address removed)