Click here to Skip to main content
15,886,199 members
Home / Discussions / C#
   

C#

 
AnswerRe: DataBound DataGridView Relational DB Problem Pin
pmarfleet19-Nov-07 9:04
pmarfleet19-Nov-07 9:04 
GeneralRe: DataBound DataGridView Relational DB Problem Pin
shirazamod19-Nov-07 9:45
shirazamod19-Nov-07 9:45 
GeneralRe: DataBound DataGridView Relational DB Problem Pin
pmarfleet19-Nov-07 9:50
pmarfleet19-Nov-07 9:50 
QuestionEnumerators and locks. Pin
jmhamm19-Nov-07 4:40
jmhamm19-Nov-07 4:40 
AnswerRe: Enumerators and locks. Pin
Bekjong19-Nov-07 5:00
Bekjong19-Nov-07 5:00 
GeneralRe: Enumerators and locks. Pin
jmhamm19-Nov-07 5:08
jmhamm19-Nov-07 5:08 
AnswerRe: Enumerators and locks. Pin
Daniel Grunwald19-Nov-07 11:42
Daniel Grunwald19-Nov-07 11:42 
QuestionFindControl on Fields on an aspx screen. Pin
imnotso#19-Nov-07 4:33
imnotso#19-Nov-07 4:33 
I am trying to find every control on my page with "txt" in the id, they are all my textboxes. The following bit of code is working fine and duly goes into the inner condition for some of the textboxes on the screen. But not all.....will this only work on textboxes that are visible at runtime as I have some sent to txtBox.visible = false at startup.

foreach (Control c in Page.FindControl("MyPage").Controls)
{
if (c.ID != "" && c.ID != null && c.ID.ToString().IndexOf("txt") > -1)
{
TextBox txtClearBox =new TextBox();
txtClearBox.ID = c.ID;
txtClearBox.Text = "";
}
}

Any advice on clearing all my textboxes would be great.

Thanks in Advance

AnswerRe: FindControl on Fields on an aspx screen. Pin
Anthony Mushrow19-Nov-07 4:42
professionalAnthony Mushrow19-Nov-07 4:42 
GeneralRe: FindControl on Fields on an aspx screen. Pin
imnotso#19-Nov-07 4:58
imnotso#19-Nov-07 4:58 
AnswerRe: FindControl on Fields on an aspx screen. Pin
martin_hughes19-Nov-07 5:27
martin_hughes19-Nov-07 5:27 
GeneralRe: FindControl on Fields on an aspx screen. Pin
imnotso#19-Nov-07 5:36
imnotso#19-Nov-07 5:36 
GeneralRe: FindControl on Fields on an aspx screen. Pin
Anthony Mushrow19-Nov-07 5:42
professionalAnthony Mushrow19-Nov-07 5:42 
GeneralRe: FindControl on Fields on an aspx screen. Pin
imnotso#19-Nov-07 5:55
imnotso#19-Nov-07 5:55 
GeneralRe: FindControl on Fields on an aspx screen. Pin
Anthony Mushrow19-Nov-07 6:08
professionalAnthony Mushrow19-Nov-07 6:08 
GeneralRe: FindControl on Fields on an aspx screen. Pin
imnotso#19-Nov-07 6:13
imnotso#19-Nov-07 6:13 
QuestionBreak out of a loop Pin
Programm3r19-Nov-07 4:16
Programm3r19-Nov-07 4:16 
AnswerRe: Break out of a loop Pin
led mike19-Nov-07 4:34
led mike19-Nov-07 4:34 
GeneralRe: Break out of a loop Pin
Programm3r19-Nov-07 4:36
Programm3r19-Nov-07 4:36 
GeneralRe: Break out of a loop Pin
led mike19-Nov-07 4:55
led mike19-Nov-07 4:55 
AnswerRe: Break out of a loop Pin
J4amieC19-Nov-07 4:34
J4amieC19-Nov-07 4:34 
AnswerRe: Break out of a loop Pin
Shpendh19-Nov-07 5:31
Shpendh19-Nov-07 5:31 
GeneralRe: Break out of a loop Pin
Colin Angus Mackay19-Nov-07 6:04
Colin Angus Mackay19-Nov-07 6:04 
GeneralRe: Break out of a loop Pin
J4amieC19-Nov-07 6:20
J4amieC19-Nov-07 6:20 
GeneralRe: Break out of a loop Pin
Mark Churchill19-Nov-07 14:33
Mark Churchill19-Nov-07 14:33 

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.