Posts

Showing posts with the label tips and tricks

Reset Text Boxes in ASP.Net

Well a small tip on ASP.NET. Sometimes when creating some user input page we need to clear all the text boxes. One example of this can be a reset or cancel button. Here is a way to do this, iterating through the ASP.Net TextBox controls in a form. Just create a Reset type subroutine - in that routine, use the following code: in C# - it would be: Control myForm = Page.FindControl("Form1"); foreach (Control ctl in myForm.Controls) if(ctl.GetType().ToString().Equals("System.Web.UI.WebControls.TextBox")) ((TextBox)ctl).Text = ""; This will clear EVERYTHING from the textboxes - even if you had them pre-populated with data. Very neat!! Enjoy Programing.. Related Article: Reset Text Boxes in ASP.Net Part 2

Visual Studio 2005 IDE Short Cuts

Hi Readers, I believe that as a programmer we all are from the lazy lots . We always try n find the possible shortcuts for every thing we do. Well I seem no harm in this!! we just wanna make life simpler and faster. I have been working on the Visual Studio 2003 and Visual Studio 2005 for the development of my projects. So I thought of bringing shortcuts of this beautiful and powerful IDE to you. Huh!!! ya ya I know there are plenty you will find on net guys so what new...Most people don't know this, but there are actually over 450 keyboard shortcuts in Visual Studio by default. But there is no easy way to find out all the keyboard shortcuts inside Visual Studio. Dear all this time I will bring a small code snippet with which you can actually produce a HTML file that will contain all the short cuts.. So here it is for all power users: Macro to generate Keyboard Shortcuts in HTML 1. Open the Visual Studio 2005 IDE 2. Go to Tools 3. select Macros, and then choose Macros IDE (or you ca...