UGN Security Forums
My ProfileMember DirectoryLogin
Search our ForumsView our FAQView our Site Rules
View our CalendarView our Active TopicsGo to our Main Page

UGN Security Store
 

Network Sites UGN Security, The GoNix Initiative, Elite Web Gamers, Back of the Web, EveryDay Helper, VNC Web Design & Development
August
Su M Tu W Th F Sa
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
Sponsored Links
Latest Postings
Amazon Gift Card Generator/KeyGen?te
by Gecko666
08/22/14 09:21 AM
Latest Reviews
Topic Options
Rate This Topic
#17650 - 10/27/02 01:18 PM Basic ASP/ADO/HTML problem
Satori Offline
Junior Member

Registered: 10/12/02
Posts: 10
Loc: San Antonio, Texas
Okay, so I'm having some trouble! I've never jacked with ADO before today, and so I started playing with it. No problem... created a very basic access database with a single table with some fields, and I can read from it and pipe the output to tables no problem. Yay!

Now, I'm trying to get the first field in each record that is displayed to have the data on a button, and where clicking the button will take you to a new page with a form that lets you edit the database. Now, the hard part ought to be the DB edit itself, but I've got that part working alright. I'm screwing up a really simple IF statement, and it's pissing me off. No matter what I do, the display isn't on a button, which means that I can't do action="edit.asp" and actually get to my edit script.... Here's the relevant lines:

Code:
<tr>
<form method="post" action="edit.asp">
<%for each x in rs.Fields
      if x.name="no" then%>
           <td><input type="submit" name="no" value="<%=x.value%>"></td>
      <%else%>
           <td><%Response.Write(x.value)%></td>
      <%end if
next
%>
</form>
<%rs.MoveNext%>
</tr>
What am I not doing correctly here? The display is just the value of the "no" field in the table, never the button with the value on it as text linking me to my other script.

Help?

Top
Sponsored Links
      
#17651 - 10/27/02 02:11 PM Re: Basic ASP/ADO/HTML problem
SilentRage Offline
DollarDNS Owner

Registered: 03/04/02
Posts: 1273
Loc: OH, USA
Code:
<tr>
<form method="post" action="edit.asp">
<%
for each x in rs.Fields
    if x.name="no" then
        Response.Write "<td><input type=""submit"" name=""no"" value=""" & x.value & """></td>"
    else
        Response.Write "<td>" & x.value & "</td>"
    end if
    rs.MoveNext
next
%>
</form>
</tr>
Give that a shot.
_________________________
Domain Registration, Hosting, Management
http://www.dollardns.net

Top

Featured Member
Registered: 08/20/13
Posts: 1
Forum Stats
2148 Members
46 Forums
33980 Topics
69147 Posts

Max Online: 1567 @ 04/25/10 02:20 AM
Top Posters
UGN Security 27142
Gremelin 7192
§intå× 3255
SilentRage 1273
Ice 1146
pergesu 1136
Infinite 1041
jonconley 955
Girlie 908
unreal 860
Newest Members
Gecko666, defghi795767, Devo60, ali, lavos
2147 Registered Users
Who's Online
0 registered (), 309 Guests and 312 Spiders online.
Key: Admin, Global Mod, Mod
Latest News


Donate
  Get Firefox!
Get FireFox!