hi,
I have three textboxes.in textbox1 am going to enter "om43 sai8" in textbox2 "87billa 8".
so now in textbox3 it should display both textbox values i mean to concatenate and here it should display only alphabets.
like "omsaibilla" in textbox3 on tabout it should happen...
any idea how to do this??

Hemlata KushwahaRank #6,963 · 252 reputationPosted Aug 12, 2015, 1:28 AM EDT
SreenishRank #7,298 · 244 reputationPosted Aug 12, 2015, 1:42 AM EDT
Hemlata KushwahaRank #6,963 · 252 reputationPosted Aug 12, 2015, 2:00 AM EDT
Upendra Pratap ShahiRank #329 · 7.5K reputationPosted Aug 12, 2015, 2:04 AM EDT
protected void btnok_Click(object sender, EventArgs e)
{
Rahul PrajapatRank #1,209 · 1.5K reputationPosted Aug 12, 2015, 5:11 PM EDT
{
string str= TextBox1.Text + TextBox2.Text;
foreach (char c in str)
{
if (!char.IsDigit(c))
TextBox3.Text += c;
}
}
Rahul PrajapatRank #1,209 · 1.5K reputationPosted Aug 12, 2015, 5:35 PM EDT
Jignesh TrivediRank #16 · 50.3K reputationPosted Aug 12, 2015, 8:24 PM EDT
Hi,
you can also use Regex to remove number from the string
protected void btnOk_Click(object sender, EventArgs e)
{
TextBox3.Text= Regex.Replace(TextBox1.Text, "[0-9]", "") + Regex.Replace(TextBox2.Text, "[0-9]", "");
}
hope this will help you.
Upendra Pratap ShahiRank #329 · 7.5K reputationPosted Aug 12, 2015, 9:13 PM EDT
Sumit JoshiRank #1,252 · 1.4K reputationPosted Aug 12, 2015, 10:37 PM EDT
{
}
SreenishRank #7,298 · 244 reputationPosted Aug 12, 2015, 10:45 PM EDT
Rajeesh MenothRank #118 · 18.4K reputationPosted Aug 12, 2015, 11:14 PM EDT
SreenishRank #7,298 · 244 reputationPosted Aug 12, 2015, 11:16 PM EDT
Rajeesh MenothRank #118 · 18.4K reputationPosted Aug 12, 2015, 11:19 PM EDT
SreenishRank #7,298 · 244 reputationPosted Aug 12, 2015, 11:21 PM EDT
Rajeesh MenothRank #118 · 18.4K reputationPosted Aug 12, 2015, 11:35 PM EDT
Upendra Pratap ShahiRank #329 · 7.5K reputationPosted Aug 12, 2015, 11:46 PM EDT
Rahul PrajapatRank #1,209 · 1.5K reputationPosted Aug 12, 2015, 11:59 PM EDT
SreenishRank #7,298 · 244 reputationPosted Aug 13, 2015, 12:33 AM EDT
SreenishRank #7,298 · 244 reputationPosted Aug 13, 2015, 12:33 AM EDT
Upendra Pratap ShahiRank #329 · 7.5K reputationPosted Aug 13, 2015, 12:42 AM EDT
SreenishRank #7,298 · 244 reputationPosted Aug 13, 2015, 12:44 AM EDT
Sumit JoshiRank #1,252 · 1.4K reputationPosted Aug 13, 2015, 12:52 AM EDT
Sumit JoshiRank #1,252 · 1.4K reputationPosted Aug 13, 2015, 12:53 AM EDT
Upendra Pratap ShahiRank #329 · 7.5K reputationPosted Aug 13, 2015, 1:16 AM EDT
Upendra Pratap ShahiRank #329 · 7.5K reputationPosted Aug 13, 2015, 11:53 PM EDT
AmanRank #607 · 3.9K reputationPosted Aug 31, 2015, 3:40 AM EDT
I am also embedding the source code so that you can download it .
If you have any query feel free to ask (Download Source Code)
Also accept it as an answer if it helps.