| |

VerySource

 Forgot password?
 Register
Search
View: 693|Reply: 2

How to access existing objects with strings?

[Copy link]

2

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 Invalid IP Address

Post time: 2020-1-19 07:00:01
| Show all posts |Read mode
I need a multiple file upload
FileIn of the uploaded file is named FileIn1, FileIn2 ...
Now I want to use a loop to implement the upload
How can I access existing objects?
Reply

Use magic Report

0

Threads

322

Posts

115.00

Credits

Newbie

Rank: 1

Credits
115.00

 China

Post time: 2020-1-26 07:18:01
| Show all posts
HtmlInputFile file = (HtmlInputFile) this.FindControls ("FileIn" + i.ToString ());
Reply

Use magic Report

2

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 Invalid IP Address

 Author| Post time: 2020-1-30 11:09:01
| Show all posts
Thank youshenmue024

But it should be HtmlInputFile file = (HtmlInputFile) this.FindControl ("FileIn" + i.ToString ())
You have one more "s"
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list