mr.Prabhu_R did u check my code before write this comment? Dont do like this hereafter. Check the code in your IDE afterwards post any comments ok. Your brain doesnt have any debugging tools. got it. remove that line and check if it works or not then u can post a comment got it.
What about the situation where we need to clear some of the textbox and not all.I know your solution is specific for situation where all the text boxes need to be cleared. But i am looking for a situation in which i can clear some of the text box. Can we explicitly build a control collection in which we include only text boxes that we need to clear.
Check it out here: Click Here for the code. Look at the second set of codes. It will clear all textbox controls except those with a specified name. Its vb but its easy to convert. I think this is what you were wanting?