Iterating through HTML Controls from codebehind

R

RSH

Hi,

I have a situation where I have 10 HTMLFileInput controls on my aspx page.
They are all named UploadedFile1,UploadedFile2...

Now on postback I am trying to construct a loop to check for values in those
fields. I can't for the life of me figure out how to do this. i tried:

Dim j As Integer = 0

For j = 0 To 10

If Len(Trim(Request.QueryString("UploadedFile" & j))) > 0 Then

UploadFile(FindControl("UploadedFile" & j), CompanyID, ReturnId)

End If

Next

Everything comes back as nothing



Dim j As Integer = 0

For j = 0 To 10

If Len(Trim(Findcontrol("UploadedFile" & j))) > 0 Then

UploadFile(FindControl("UploadedFile" & j), CompanyID, ReturnId)

End If

Next

Everything comes back at nothing.



What is the correct way to get at the value of the controls (remember they
are HTML Controls).



Thanks,

Ron
 

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,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top