tags:

views:

9

answers:

0

am using C#, VS-2005

The rutime controls like textboxes created as below

Textbox Tb=new Textbox();

Tb.Location=tbpoint; // Declare In Class of Body

Tb.Name="TBox"+ i.tostring(); // Variable i Declare In Class of Body

tbpoint.Y+=30;

i++;

The above textbox is created now for rutime. And question is how do i get last Index of the above textbox and how to call it for set in specific condition.

Suppose

My last textbox index is TBox03 and my cursor on another control like textbox3 the situation i know therefore i will create it as below.

If (TBox03.text=="") {

textbox4.focus();}

The above created as i aware of situation but when it's on rutime then How would the lastindex will get and call it for focus on another control.

kindly provide sum example with coding.