Click here to Skip to main content
15,911,039 members
Home / Discussions / C#
   

C#

 
AnswerRe: database in sql server 2000 using c# Pin
Michael Bookatz12-Mar-09 5:23
Michael Bookatz12-Mar-09 5:23 
GeneralRe: database in sql server 2000 using c# Pin
mariamkhaqan13-Mar-09 3:00
mariamkhaqan13-Mar-09 3:00 
QuestionSimple question about controls Pin
bouli12-Mar-09 4:14
bouli12-Mar-09 4:14 
Hello gurus,

I have a simple question for C# masters concerning controls.

I have a series of label with a formated name.

In a loop, I want to recover a pointer on the control (a label) by giving its name as a string.

for example:

<br />
Label lbl = null;<br />
string lblName = "";<br />
<br />
for (int i=0; i<5; i++)<br />
{<br />
  lblName = "lblL" + i.ToString(); // lblName will contain "lblL0", "lblL1" etc.<br />
<br />
  // here is what I'm looking for...<br />
  lbl = ???; // the label is supposed to point on the label with the built name contained in the variable lblName.<br />
<br />
<br />
  // now the lbl variable points on the right control with name given by the variable lblName<br />
  lbl.Text = i.ToString();<br />
}<br />
<br />


How to make the control pointing to the right one given its name?

I hope you understood my question in my poor english.

Best regards.

Fred.

There is no spoon.

AnswerRe: Simple question about controls Pin
RyanMorris12-Mar-09 4:20
RyanMorris12-Mar-09 4:20 
GeneralRe: Simple question about controls [modified] Pin
bouli12-Mar-09 4:30
bouli12-Mar-09 4:30 
GeneralRe: Simple question about controls Pin
RyanMorris12-Mar-09 4:55
RyanMorris12-Mar-09 4:55 
AnswerRe: Simple question about controls Pin
Yusuf12-Mar-09 4:25
Yusuf12-Mar-09 4:25 
GeneralRe: Simple question about controls Pin
bouli12-Mar-09 4:38
bouli12-Mar-09 4:38 
GeneralRe: Simple question about controls Pin
Yusuf12-Mar-09 4:56
Yusuf12-Mar-09 4:56 
GeneralRe: Simple question about controls Pin
bouli12-Mar-09 5:42
bouli12-Mar-09 5:42 
AnswerRe: Simple question about controls Pin
musefan12-Mar-09 5:03
musefan12-Mar-09 5:03 
QuestionATM program in consol application Pin
btata12-Mar-09 4:07
btata12-Mar-09 4:07 
AnswerRe: ATM program in consol application Pin
musefan12-Mar-09 4:23
musefan12-Mar-09 4:23 
AnswerRe: ATM program in consol application Pin
Yusuf12-Mar-09 4:26
Yusuf12-Mar-09 4:26 
AnswerRe: ATM program in consol application Pin
Teuz12-Mar-09 5:12
Teuz12-Mar-09 5:12 
AnswerRe: ATM program in consol application Pin
Michael Bookatz12-Mar-09 5:21
Michael Bookatz12-Mar-09 5:21 
AnswerRe: ATM program in consol application Pin
Nagy Vilmos12-Mar-09 5:47
professionalNagy Vilmos12-Mar-09 5:47 
Questionaccess asp.net website from an ip address ? Pin
Mubeen.asim12-Mar-09 3:30
Mubeen.asim12-Mar-09 3:30 
AnswerRe: access asp.net website from an ip address ? Pin
musefan12-Mar-09 3:32
musefan12-Mar-09 3:32 
GeneralRe: access asp.net website from an ip address ? Pin
Mubeen.asim12-Mar-09 3:39
Mubeen.asim12-Mar-09 3:39 
AnswerRe: access asp.net website from an ip address ? Pin
Yusuf12-Mar-09 4:29
Yusuf12-Mar-09 4:29 
QuestionPop a Context Menu Anywhere on Screen??? Pin
User 238229212-Mar-09 3:21
User 238229212-Mar-09 3:21 
AnswerRe: Pop a Context Menu Anywhere on Screen??? Pin
Nagy Vilmos12-Mar-09 3:24
professionalNagy Vilmos12-Mar-09 3:24 
AnswerRe: Pop a Context Menu Anywhere on Screen??? Pin
Xmen Real 12-Mar-09 3:52
professional Xmen Real 12-Mar-09 3:52 
AnswerRe: Pop a Context Menu Anywhere on Screen??? Pin
User 238229212-Mar-09 19:17
User 238229212-Mar-09 19:17 

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.