Click here to Skip to main content
15,889,724 members
Home / Discussions / C#
   

C#

 
SuggestionRe: How do I download big file of applications Pin
Richard MacCutchan15-Oct-15 23:03
mveRichard MacCutchan15-Oct-15 23:03 
GeneralRe: How do I download big file of applications Pin
Member 1201610615-Oct-15 23:31
Member 1201610615-Oct-15 23:31 
GeneralRe: How do I download big file of applications Pin
molesworth16-Oct-15 2:43
molesworth16-Oct-15 2:43 
AnswerRe: How do I download big file of applications Pin
Richard Deeming16-Oct-15 2:44
mveRichard Deeming16-Oct-15 2:44 
QuestionI try to dynamically generate a name for my objects Pin
Member 1019526215-Oct-15 10:41
Member 1019526215-Oct-15 10:41 
AnswerRe: I try to dynamically generate a name for my objects Pin
BillWoodruff15-Oct-15 18:56
professionalBillWoodruff15-Oct-15 18:56 
GeneralRe: I try to dynamically generate a name for my objects Pin
Member 1019526219-Oct-15 7:11
Member 1019526219-Oct-15 7:11 
QuestionAccessing dynamically generated textboxes Pin
KakitaIppatsu15-Oct-15 5:43
KakitaIppatsu15-Oct-15 5:43 
I have dynamically created textboxes in a loop, and given them names at creation time.

C#
txtProdName.Name = "txtProdName" + i;
pn.Controls.Add(txtProdName);
txtProdDesc.Name = "txtProdDesc" + i;
pn.Controls.Add(txtProdDesc);


The above snippet works fine. Controls are created, and removed as needed.
Now, I would like to go back and read or write information into these textboxes, but I'm at a lost as to how to address them.

I'm trying to do something like:
C#
txtProdName + i.Text = "Blah";
txtProdDesc + i.Text = "Blah2";


Now I know the above code won't work, but wondering if there is someway to do something similar? Or am I totally barking up the wrong tree.

Thanks in advance.

P.S. I haven't found an answer to this anywhere, which leads me to believe I'm at the wrong tree. Big Grin | :-D
AnswerRe: Accessing dynamically generated textboxes Pin
OriginalGriff15-Oct-15 6:11
mveOriginalGriff15-Oct-15 6:11 
GeneralRe: Accessing dynamically generated textboxes Pin
KakitaIppatsu15-Oct-15 6:39
KakitaIppatsu15-Oct-15 6:39 
GeneralRe: Accessing dynamically generated textboxes Pin
OriginalGriff15-Oct-15 7:06
mveOriginalGriff15-Oct-15 7:06 
AnswerRe: Accessing dynamically generated textboxes Pin
BillWoodruff15-Oct-15 6:52
professionalBillWoodruff15-Oct-15 6:52 
GeneralRe: Accessing dynamically generated textboxes Pin
KakitaIppatsu15-Oct-15 7:47
KakitaIppatsu15-Oct-15 7:47 
QuestionThe “Microsoft.CodeAnalysis.BuildTasks.Csc” task could not be loaded from the assembly Pin
Member 1204569215-Oct-15 3:31
Member 1204569215-Oct-15 3:31 
QuestionTime to draw 2 usercontrols on a form is depend on each other. Pin
LeHuuTien14-Oct-15 16:10
LeHuuTien14-Oct-15 16:10 
AnswerRe: Time to draw 2 usercontrols on a form is depend on each other. Pin
BillWoodruff14-Oct-15 20:37
professionalBillWoodruff14-Oct-15 20:37 
GeneralRe: Time to draw 2 usercontrols on a form is depend on each other. Pin
LeHuuTien14-Oct-15 22:27
LeHuuTien14-Oct-15 22:27 
GeneralRe: Time to draw 2 usercontrols on a form is depend on each other. Pin
BillWoodruff14-Oct-15 22:38
professionalBillWoodruff14-Oct-15 22:38 
GeneralRe: Time to draw 2 usercontrols on a form is depend on each other. Pin
LeHuuTien14-Oct-15 23:10
LeHuuTien14-Oct-15 23:10 
GeneralRe: Time to draw 2 usercontrols on a form is depend on each other. Pin
Pete O'Hanlon14-Oct-15 23:13
mvePete O'Hanlon14-Oct-15 23:13 
GeneralRe: Time to draw 2 usercontrols on a form is depend on each other. Pin
LeHuuTien14-Oct-15 23:22
LeHuuTien14-Oct-15 23:22 
GeneralRe: Time to draw 2 usercontrols on a form is depend on each other. Pin
Pete O'Hanlon14-Oct-15 23:42
mvePete O'Hanlon14-Oct-15 23:42 
GeneralRe: Time to draw 2 usercontrols on a form is depend on each other. Pin
LeHuuTien14-Oct-15 23:45
LeHuuTien14-Oct-15 23:45 
GeneralRe: Time to draw 2 usercontrols on a form is depend on each other. Pin
BillWoodruff15-Oct-15 8:24
professionalBillWoodruff15-Oct-15 8:24 
AnswerRe: Time to draw 2 usercontrols on a form is depend on each other. Pin
Gerry Schmitz15-Oct-15 9:38
mveGerry Schmitz15-Oct-15 9:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.