Click here to Skip to main content
15,914,820 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: SMTP Exception Pin
DKalepu14-Jun-07 2:50
DKalepu14-Jun-07 2:50 
GeneralRe: SMTP Exception Pin
szukuro14-Jun-07 3:50
szukuro14-Jun-07 3:50 
Questionto clear all the textboxes in web page Pin
codingrocks14-Jun-07 1:59
codingrocks14-Jun-07 1:59 
AnswerRe: to clear all the textboxes in web page [modified] Pin
pradeep kumarappagari14-Jun-07 2:09
pradeep kumarappagari14-Jun-07 2:09 
AnswerRe: to clear all the textboxes in web page Pin
Blue_Boy14-Jun-07 2:10
Blue_Boy14-Jun-07 2:10 
AnswerRe: to clear all the textboxes in web page Pin
Sylvester george14-Jun-07 2:11
Sylvester george14-Jun-07 2:11 
AnswerRe: to clear all the textboxes in web page Pin
dhulipudi14-Jun-07 3:34
dhulipudi14-Jun-07 3:34 
AnswerRe: to clear all the textboxes in web page Pin
szukuro14-Jun-07 4:14
szukuro14-Jun-07 4:14 
I saw you got a few answers to your question, however it seems (without the intention to criticize the others responses) that none of them solve the given task in all scenarios. Problems may arise due to the fact, that for each Control the Controls collection only contains its child controls but not the children of the child controls. This can cause problems if the nesting of the TextBoxes is deep. A simple case of this would be if the TextBox was inside a TableCell. Iterating through the Forms controls can only get you the Table object, and even if you iterate through Tables controls, you only get TableRows. The correct solution is to iterate through the Forms children, then through its childen's children and so on. A recursive algorithm if you like. Something along the lines of:
void ClearTextBoxes(Control control)
{
    foreach (Control child in control.Controls)
    {
        if (child is TextBox)
            ((TextBox)child).Text = String.Empty;
        else
            ClearTextBoxes(child);
    }

}
Obviously if the nesting does not run deep than you don't need this kind of precision.
QuestionMsgbox in asp.net Pin
Member 387988114-Jun-07 1:47
Member 387988114-Jun-07 1:47 
AnswerRe: Msgbox in asp.net Pin
Sathesh Sakthivel14-Jun-07 1:53
Sathesh Sakthivel14-Jun-07 1:53 
AnswerRe: Msgbox in asp.net Pin
Sylvester george14-Jun-07 2:01
Sylvester george14-Jun-07 2:01 
GeneralRe: Msgbox in asp.net Pin
shervin jijo14-Jun-07 18:15
shervin jijo14-Jun-07 18:15 
AnswerRe: Msgbox in asp.net Pin
koolprasad200314-Jun-07 23:19
professionalkoolprasad200314-Jun-07 23:19 
Questionwebpages flickers/Blinks during post backs.... Pin
dhulipudi14-Jun-07 1:29
dhulipudi14-Jun-07 1:29 
AnswerRe: webpages flickers/Blinks during post backs.... Pin
Sylvester george14-Jun-07 2:19
Sylvester george14-Jun-07 2:19 
GeneralRe: webpages flickers/Blinks during post backs.... Pin
dhulipudi14-Jun-07 3:21
dhulipudi14-Jun-07 3:21 
Questionquery problem (with date format) in dot net Pin
deep714-Jun-07 1:25
deep714-Jun-07 1:25 
AnswerRe: query problem (with date format) in dot net Pin
andyharman14-Jun-07 3:33
professionalandyharman14-Jun-07 3:33 
GeneralRe: query problem (with date format) in dot net Pin
deep714-Jun-07 18:47
deep714-Jun-07 18:47 
QuestionChat coding Pin
Sathiya Narayanan14-Jun-07 1:22
Sathiya Narayanan14-Jun-07 1:22 
AnswerRe: Chat coding Pin
Sathesh Sakthivel14-Jun-07 1:30
Sathesh Sakthivel14-Jun-07 1:30 
QuestionHelp Pin
Kartik Rathi14-Jun-07 1:16
Kartik Rathi14-Jun-07 1:16 
AnswerRe: Help Pin
Sathesh Sakthivel14-Jun-07 1:19
Sathesh Sakthivel14-Jun-07 1:19 
QuestionCrystal Reports Pin
teddddddddddd14-Jun-07 1:06
teddddddddddd14-Jun-07 1:06 
AnswerRe: Crystal Reports Pin
Sathesh Sakthivel14-Jun-07 1:22
Sathesh Sakthivel14-Jun-07 1:22 

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.