B
Brad
The following code work on my pc (win2003 server) but does not work when
deployed to a server (win2000 server).
For count As Integer = 1 To 4
Dim input As New HtmlInputFile
input = CType(Me.FindControl("File" & count.ToString), HtmlInputFile)
Next count
I have four htmlinputfile controls, for upload files, on one form. As the
code shows I interiate throw the controls. On the server it bombs on the
first iteration with the error "Object reference not set to an instance of
an object" because it cannot find any of the controls. Obvious question
is.....why?
Yes, I have them set to run at server. Yes I have the controls defined in
the code behind. If I access each of the file controls specifically by name
I have no problem...only when using FindControl.
Brad
deployed to a server (win2000 server).
For count As Integer = 1 To 4
Dim input As New HtmlInputFile
input = CType(Me.FindControl("File" & count.ToString), HtmlInputFile)
Next count
I have four htmlinputfile controls, for upload files, on one form. As the
code shows I interiate throw the controls. On the server it bombs on the
first iteration with the error "Object reference not set to an instance of
an object" because it cannot find any of the controls. Obvious question
is.....why?
Yes, I have them set to run at server. Yes I have the controls defined in
the code behind. If I access each of the file controls specifically by name
I have no problem...only when using FindControl.
Brad