content top
Loop through all controls in a user cont...
Loop through all controls in a user control
Task : You have a user control. And you want to loop through all the controls in that user control. You write the following code foreach (Control ctrl in control.Controls) { //Do your task. } And you are wrong. Reason : As you know, all the forms/Usercontrols have a control collection. A control collection...
Restrict user go back to previous page a...
Problem: User Logs out.  User is redirected to signout page User click back button. The previous page is displayed. How is it possible to prevent the user from visiting the previous pages after logout ? Reason: The previous pages are cached in Browser. When u click the back button the pages are served...
StringBuilder Vs String Concatenations...
StringBuilder or String Concatenation.. Is there any real performance issue in string concatenation ? When should I use StringBuilder ? To answer these questions, first lets examine the difference between String and StringBuilder classes. What is the difference between String and StringBuilder? String...