tab event
hello,,,i m a fresher....
i have two textbox,,,,if i enter string in one textbox ,,that i want to copy in another textbox ,,when i press tab key..how can i do that?
please provide me code
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
kiran kumarPosted Feb 22, 2010, 4:28 AM
CODE
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace tabctrl
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
this.KeyUp+=new KeyEventHandler(thiskey);
this.KeyPreview = true;
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void thiskey(object sender,KeyEventArgs e)
{
if (e.KeyCode==Keys.Tab)
{
textBox2.Text = textBox1.Text;
}
}
}
}
MARK THE ANSWER IF IT HELPS YOU
Lalit MPosted Feb 22, 2010, 3:04 AM
Amit ChoudharyPosted Feb 22, 2010, 2:50 AM
you can use javascript for this..
see below code
Please marks as answer if it helps.
Lalit MPosted Feb 22, 2010, 2:38 AM