TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
kumartyr
NA
55
28k
How to autopopulate a textbx with data keyed in other txtbox
Jul 9 2013 2:17 AM
i have two textbox in a form and will be typing firstname and lastname in that two textbox
what i want is if i type a name in first textbox and do tab or mouseclick to next textbox i want the matching lastname of the firstname
to be automatically populated
how to do this... i have written the below coding but am not able to find which textbox event will be appropriate to do this..
please someone clarify my doubt
if (LastNameTextBox.Text == "")
{
ACSCLN = new AutoCompleteStringCollection();
ORCMND13 = new OracleCommand("Select LASTNAME from VMS_VISITOR where FIRSTNAME='" + FirstNameTextBox.Text + "'", CON);
DR22 = ORCMND13.ExecuteReader();
if (DR22.HasRows == true)
{
while (DR22.Read())
{
ACSCLN.Add(DR22["LASTNAME"].ToString());
}
LastNameTextBox.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
LastNameTextBox.AutoCompleteSource = AutoCompleteSource.CustomSource;
LastNameTextBox.AutoCompleteCustomSource = ACSCLN;
}
LastNameTextBox.Focus();
Reply
Answers (
2
)
How to Create Barcodes in Crystal Reports Using C#.NET
How to image file upload and download in Gridview..?