Click here to Skip to main content
15,895,504 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Validation Question - Help Pin
Manfred Rudolf Bihy21-May-13 3:26
professionalManfred Rudolf Bihy21-May-13 3:26 
QuestionMerging Two columns under same heading in Gridview Pin
pavithrasubbareddy20-May-13 2:40
pavithrasubbareddy20-May-13 2:40 
AnswerRe: Merging Two columns under same heading in Gridview Pin
David Mujica20-May-13 3:46
David Mujica20-May-13 3:46 
GeneralRe: Merging Two columns under same heading in Gridview Pin
pavithrasubbareddy20-May-13 19:14
pavithrasubbareddy20-May-13 19:14 
AnswerRe: Merging Two columns under same heading in Gridview Pin
cyber_addicted21-May-13 0:25
cyber_addicted21-May-13 0:25 
QuestionAjax Cascading Dropdown Pin
Laiju k20-May-13 1:36
professionalLaiju k20-May-13 1:36 
QuestionClearing Textboxes (Foreach) Not Working Pin
Member 991209119-May-13 7:24
Member 991209119-May-13 7:24 
AnswerRe: Clearing Textboxes (Foreach) Not Working Pin
Richard Deeming20-May-13 2:06
mveRichard Deeming20-May-13 2:06 
Are your TextBoxes immediate descendants of the page? It's unlikely; you've probably got several layers of controls between them.

Try this:
C#
public void ClearTextBoxes(Control control)
{
   foreach (Control c in control.Controls)
   {
      var textBox = c as TextBox;
      if (textBox != null)
      {
         textBox.Text = " ";
      }
      else if (c.HasControls)
      {
         ClearTextBoxes(c);
      }
   }
}




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: Clearing Textboxes (Foreach) Not Working Pin
Member 991209121-May-13 7:56
Member 991209121-May-13 7:56 
AnswerRe: Clearing Textboxes (Foreach) Not Working Pin
cyber_addicted21-May-13 0:33
cyber_addicted21-May-13 0:33 
GeneralRe: Clearing Textboxes (Foreach) Not Working Pin
Member 991209121-May-13 7:57
Member 991209121-May-13 7:57 
GeneralRe: Clearing Textboxes (Foreach) Not Working Pin
cyber_addicted21-May-13 20:14
cyber_addicted21-May-13 20:14 
AnswerRe: Clearing Textboxes (Foreach) Not Working Pin
wikizhao27-May-13 21:14
wikizhao27-May-13 21:14 
QuestionC#.Net Windows Application Pin
Mohsin Afzal18-May-13 2:20
professionalMohsin Afzal18-May-13 2:20 
AnswerRe: C#.Net Windows Application Pin
Mohammed Hameed18-May-13 10:57
professionalMohammed Hameed18-May-13 10:57 
AnswerRe: C#.Net Windows Application Pin
ZurdoDev21-May-13 10:24
professionalZurdoDev21-May-13 10:24 
GeneralRe: C#.Net Windows Application Pin
Mohsin Afzal27-May-13 3:47
professionalMohsin Afzal27-May-13 3:47 
AnswerRe: C#.Net Windows Application Pin
MaulikDusara26-May-13 18:30
MaulikDusara26-May-13 18:30 
GeneralRe: C#.Net Windows Application Pin
Mohsin Afzal27-May-13 3:45
professionalMohsin Afzal27-May-13 3:45 
Questionmvc book Pin
Member 870181318-May-13 1:13
Member 870181318-May-13 1:13 
AnswerRe: mvc book Pin
cyber_addicted21-May-13 0:38
cyber_addicted21-May-13 0:38 
GeneralRe: mvc book Pin
Member 870181321-May-13 3:40
Member 870181321-May-13 3:40 
GeneralRe: mvc book Pin
cyber_addicted21-May-13 20:15
cyber_addicted21-May-13 20:15 
QuestionAccess Database, ASP/C# Drop Down List populating a Drop Down List Pin
WickedFooker17-May-13 15:00
WickedFooker17-May-13 15:00 
AnswerRe: Access Database, ASP/C# Drop Down List populating a Drop Down List Pin
Richard Deeming20-May-13 2:02
mveRichard Deeming20-May-13 2:02 

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.