Click here to Skip to main content
15,893,564 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
If I have a set of objects. like textboxes, in an asp.net web page, with ids that are similar except for numeric difference, like id1, id2, id3, etc.... Each having a different text value.

In the code behind, can I declare a variable string named ID and set its value to id, then in a loop, concatenate numeric values like 1,2,3, etc to it and dereference that string to get each variables value?
Posted
Updated 21-Mar-14 17:45pm
v2
Comments
PIEBALDconsult 21-Mar-14 23:58pm    
Who votes these down? It's begoming ridiculous.

1 solution

You might be interested in an array or a list.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900