Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old December 23rd, 2006, 11:14 AM
Authorized User
Join Date: Nov 2006
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default textbox MaxLength

I am using C# 2005 to develop a application.
At Design Time i set the property of textBox like this

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)
            //if(e.KeyCode ==Keys.Enter)
            // MessageBox.Show("You Pressed Enter");

private void txtVendorName_KeyPress(object sender, KeyPressEventArgs e)

Help me

Thanks and Regards
Kumar Ashish
Kumar Ashish
Old December 27th, 2006, 06:31 AM
Registered User
Join Date: Dec 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
VB .Net TextBox MaxLength Mocha Visual Studio 2005 1 October 10th, 2007 08:35 AM
Changing maxlength in JScript BrianWren Javascript How-To 2 June 20th, 2006 03:11 PM
maxLength property crmpicco HTML Code Clinic 2 July 7th, 2005 06:53 AM
textbox cutting off text? but maxlength is 10,000? ALEX_GRIM Classic ASP Basics 3 February 6th, 2005 08:47 AM
textbox Maxlength problem ashu_gupta75 Classic ASP Basics 5 May 6th, 2004 03:48 AM

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