ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 24th, 2003, 06:35 AM
leeolive leeolive is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: London
Posts: 43 leeolive User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
allow someone to edit a form

Hi

I have a form which I would like to allow a customer to edit/update. I need to populate the text boxes with retrieved data and then allow customer to select 'update' button. I can't figure out the syntax to place the retrieved value within an input box.

I have this so far, which obviously doesn't work - double quotes etc. Tried double and single quotes but no value appears.
Also tried placing retrieved value within variable, but didn';t work either.

<input type="text" name="FirstName" value="<%=rsdetails("FirstName")%>"

Sure it's very simple..
Thanks!
Lee

Reply With Quote
  #2  
Old October 24th, 2003, 07:38 AM
Vlince Vlince is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Canada, Quebec, Montreal
Posts: 410 Vlince User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
The first thing you must do is, like you say, retrieve the data that you need(the ones that'll go into the <textboxes>.
In order to do that, you'll have to create and SQL Query.

Now since your SQL Query will look something like:
(I'm assuming it's gonna look like that)

SELECT Field1, Field2, ...
FROM MyTable
WHERE someID = 19

The 19 here is only an example of a uniqueID.

You do understand that Query *should* only bring back *one* record right?

If that's the case then you don't need to/won't have to *loop* inside your recordset right? (because you only have one record)

Now because of this, I strongly recommand putting the data from that *one* record into variables. Only then use these variables to put inside your <form>...</form>.

So...this is an example of the top of my head, it is NOT tested but should give you an idea:

Download the attach file I've sent, all the code is in there and it should be trivial...

Hope this helps!
Sincerely

Vlince
Attached Files
File Type: asp tmp2.asp (1.7 KB, 176 views)

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > allow someone to edit a form


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway