HtmlInputFile

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top