Hi,
I am developing an application in VisualBasic .NET and got the
following error:
"An unhandled exception of type 'System.Invalid CastException' occurred
in microsoft.visua lbasic.dll
Additional information: Argument 1 to method 'Control.Render Control'
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.H tmlTextWriter(s w)
targetObj = a.CreateInstanc e(aT.FullName)
targetObj.Rende rControl(tw) <--- here's the problem!
MsgBox(sw.ToStr ing())
Hopefuly someone will have an idea what's wrong.
Blaz Ziherl
blaz.ziherl@abr axas.si
I am developing an application in VisualBasic .NET and got the
following error:
"An unhandled exception of type 'System.Invalid CastException' occurred
in microsoft.visua lbasic.dll
Additional information: Argument 1 to method 'Control.Render Control'
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.H tmlTextWriter(s w)
targetObj = a.CreateInstanc e(aT.FullName)
targetObj.Rende rControl(tw) <--- here's the problem!
MsgBox(sw.ToStr ing())
Hopefuly someone will have an idea what's wrong.
Blaz Ziherl
blaz.ziherl@abr axas.si
Comment