hello guys, i have a textbox in a form called form1 where the user is to fill his/her name, i need to do some validation to the textbox so that the user inputs only alphabetical letters, i also need to display the user inputs to another form where i have a multiline textbox can some one show me how to do this.thanks
Ps. if you put some code here can you please put it in a way so that i will now which is for which .so i will learn bit by bit.thanks
Loading
azzo stonesPosted Oct 3, 2011, 4:36 PM
VulpesPosted Oct 3, 2011, 1:47 PM
// add this using directive
using System.Globalization;
// change the other code to the following
TextBox tb = form2.Controls["mlTextBox"] as TextBox
if (tb != null) // if it's null something's wrong!
{
TextInfo ti = CultureInfo.CurrentCulture.TextInfo;
string name = this.textBox1.Text.Trim() + " " + this.textBox2.Text.Trim();
tb.Text = ti.ToTitleCase(name);
}
azzo stonesPosted Oct 3, 2011, 1:13 PM
VulpesPosted Oct 3, 2011, 6:59 AM
azzo stonesPosted Oct 3, 2011, 5:37 AM
Prabhu RajaPosted Oct 3, 2011, 5:00 AM