Active Server Pages

Moderators: None (Apply to moderate this forum)
Number of threads: 1763
Number of posts: 4498

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Edit Report
How do I fill a textbox from a recordset Posted by Jose on 16 Feb 2001 at 4:14 PM
I currently am working on a project where I need to populate a textboxes from a db. I have the connection string and recordset working. I am passing the values from the db to the screen using 'response.write RS("myfields")', etc.
But what I really need to do is pass the variables to my textboxes and I can't get it to do this.

Does anyone know how to do this????

Jose

Edit Report
Re: How do I fill a textbox from a recordset Posted by Matt(AA) on 16 Feb 2001 at 8:13 PM
Lets say you have a text box in your ASP page, like so:

<input type="text" name="first_name" value="" size="30">

To put text into the text box, do this:

<input type="text" name="first_name" value="<%= rs("first_name") %>" size="30">

You could also do something similar using Response.Write:

Response.Write("<input type=""text"" name=""first_name"" value=""" & rs("first_name") & """ size=""30"">")

Hope this helps,
Matt(AA)

: I currently am working on a project where I need to populate a textboxes from a db. I have the connection string and recordset working. I am passing the values from the db to the screen using 'response.write RS("myfields")', etc.
: But what I really need to do is pass the variables to my textboxes and I can't get it to do this.
:
: Does anyone know how to do this????
:
: Jose
:





 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.