p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   C# 2005 (http://p2p.wrox.com/forumdisplay.php?f=138)
-   -   textbox MaxLength (http://p2p.wrox.com/showthread.php?t=51892)

akumarp2p December 23rd, 2006 11:14 AM

textbox MaxLength
 
hi
I am using C# 2005 to develop a application.
At Design Time i set the property of textBox like this
textBox1.MaxLength=25

but it takes more than 25 Character.

This problem also occurs with Multiline textBox.

Another problem is this on click of enter no message display

  private void txtVendorName_KeyUp(object sender, KeyEventArgs e)
        {
            MessageBox.Show(e.KeyValue.ToString());
            //if(e.KeyCode ==Keys.Enter)
            //{
            // MessageBox.Show("You Pressed Enter");
            //}
            //MessageBox.Show(e.KeyValue.ToString());
        }

private void txtVendorName_KeyPress(object sender, KeyPressEventArgs e)
        {
            MessageBox.Show(e.KeyChar.ToString());
        }

Urgent
Help me

Thanks and Regards
Kumar Ashish
9350789189

savitamunde December 27th, 2006 06:31 AM

kumar

U need to set the property of your control
textBox property MaxLength=25. Then it won't take more than 25.




All times are GMT -4. The time now is 05:51 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.