Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: Help with script


Message #1 by "Joshua Ballew" <Jaballew@h...> on Wed, 30 Jan 2002 02:55:43
I want to create a page where an Admin could pick a name from a text box 

which is comes from a data base. I want the admin to be able to pick a 

name in the text box and the data about that person appear in text boxs 

below

for example.

 

List Box

John Doe

Suse Que

Fred doe



then i would have text boxes



Name Box 

Address Box

And more Box



Then if i highlight John Doe then all of infomation appear in the text box



Name: John Doe

Address: 123 Some street



How would i do something like this. 

Thank you
Message #2 by "Ken Schaefer" <ken@a...> on Wed, 30 Jan 2002 14:13:34 +1100
Do you want to do this client-side or server-side?



Since this is an ASP list, I assume you want to do this server-side.

In the list box you need to store the Primary Key for the User's table (eg

UserID) as the value of each option:



<option value="1">John Doe</option>

<option value="2">Mary Smith</option>



then, when the user selects an option this value is submitted to the server.

The server uses the primary key value to look up the relevant details for

that particular user, and writes them into the text boxes as required.



Cheers

Ken



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

From: "Joshua Ballew" <Jaballew@h...>

Subject: [asp_web_howto] Help with script





: I want to create a page where an Admin could pick a name from a text box

: which is comes from a data base. I want the admin to be able to pick a

: name in the text box and the data about that person appear in text boxs

: below

: for example.

:

: List Box

: John Doe

: Suse Que

: Fred doe

:

: then i would have text boxes

:

: Name Box

: Address Box

: And more Box

:

: Then if i highlight John Doe then all of infomation appear in the text box

:

: Name: John Doe

: Address: 123 Some street

:

: How would i do something like this.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




  Return to Index