Skip to main content

Posts

How do I make a textbox that only accepts numbers?

How do I make a textbox that only accepts numbers? private void textBox1_KeyPress( object sender, KeyPressEventArgs e) {     if (! char . IsControl (e. KeyChar )         && ! char . IsDigit (e. KeyChar )         && e. KeyChar != '.' )     {         e. Handled = true ;     }     // only allow one decimal point     if (e. KeyChar == '.'         && (sender as TextBox ). Text . IndexOf ( '.' ) > - 1 )     {         e. Handled = true ;     } } Or use this  private void textBox1_TextChanged ( object sender , EventArgs e )     {         if ( System . Text . RegularEx...

Happy Diwaly

Happy Diwali to all All

How to read Password Field

          How to read Password From Website              Right-click the password box and select "Inspect Element." This brings up the developer console. On the line that starts with "input type=password" change the word "password" to "text." This will reveal your password. While you can always pop into your browsers menu screen to look up saved passwords (or into your LastPass profile), this is a far quicker way to see your hidden passwords. Thanx for read this Article..

SQL Server CONVERT() Function

SQL Server  CONVERT()  Function The CONVERT() function is a general function that converts an expression of one data type to another. The CONVERT() function can be used to display date/time data in different formats. Syntax CONVERT( data_type(length) , expression , style ) Example The following script uses the CONVERT() function to display different formats. We will use the GETDATE() function to get the current date/time: CONVERT(VARCHAR(19),GETDATE()) CONVERT(VARCHAR(10),GETDATE(),10) CONVERT(VARCHAR(10),GETDATE(),110) CONVERT(VARCHAR(11),GETDATE(),6) CONVERT(VARCHAR(11),GETDATE(),106) CONVERT(VARCHAR(24),GETDATE(),113) The result would look something like this: Nov 04 2011 11:45 PM 11-04-11 11-04-2011 04 Nov 11 04 Nov 2011 04 Nov 2011 11:45:34:243