.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Home >> Forum >> C# >> Post New QuestionBookmark and Share Subscribe to Forum

Total Charecters

Posted By: Rama Krishna     Posted Date: August 14, 2009    Points:2   Category :C#
in textbox1 i entered some text,in textbox2 i want to display total no of charecters entered in textbox1

Author: Akhil Raj       [Moderator]      
Posted Date: August 14, 2009     Points: 5   

just call TextBox1.Text.Length and display in the TextBox2 in the textchanged event of TextBox1

Author: Syed Shakeer Hussain             
Posted Date: August 15, 2009     Points: 5   

Hi Krishana,
first select your textbox event.In Events double click on ' TextChanged 'event.and write the below code as follows.

private void txtmessage_TextChanged(object sender, EventArgs e)
if (txtmessage.Text.Length > 0)

txtcount.Text = txtmessage.Text.Length.ToString();
txtcount.Text = Convert.ToString(0);


Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend