Active Server Pages Programming (ASP)/data binding within textbox

Advertisement


Question
Hello sir,
I am designing a Library management System. I want a help from you. If a user id is entered into a textbox, username of that user id should appear in another textbox. how to code it ?


Answer
For each textbox I would create a hidden input variable with the same index as your textbox.

So, for example,

<input type="Text" name="name1" value="1">
<input type"hidden" name="hidden1" value="John Smith">

Associate javascript function on blur, or whenever the user finishes entering his input.
In this javascript function you could parse the last digit of the textbox in question (1) and concatenate it with hidden filed. Once all is done, just query the value of the hidden filed for the user name.

Hope this helps,
Regards,
Robert  

Active Server Pages Programming (ASP)

All Answers


Answers by Expert:


Ask Experts

Volunteer


robert mamayev

Expertise

Main focus is classic ASP, Oracle 9i and 10g and MySQL databases

Experience

I am an expert with classicASP. I can answer any questions you might have about the ASP language, HTML, website design and development. I am not an expert in ASP.NET yet, so please don't ask me any questions specific to ASP.NET. Also, be sure to visit my IdeaJets website.

Publications
Article List

Education/Credentials
BS in Computer Science, Queens College, NYC

Awards and Honors
Oracle Database Certified Professional (9i databases)

Past/Present Clients
Pfizer, MasterCard

©2012 About.com, a part of The New York Times Company. All rights reserved.