469,323 Members | 1,266 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,323 developers. It's quick & easy.

display all data row with element(loops)

guys i have some probs..
for asp.net you don't have to worried about data from database which more than 1 row to display..
but in asp... got any clues what to do?
is't i have to
Expand|Select|Wrap|Line Numbers
  1. dim x
  2. x=0
  3. Response.Write "<input type="text" id='temp"& x &"' value='rs(data)'>"
is't like that?
Oct 26 '08 #1
3 1625
GazMathias
202 Expert 128KB
guys i have some probs..
for asp.net you don't have to worried about data from database which more than 1 row to display..
but in asp... got any clues what to do?
is't i have to
Expand|Select|Wrap|Line Numbers
  1. dim x
  2. x=0
  3. Response.Write "<input type="text" id='temp"& x &"' value='rs(data)'>"
is't like that?
Expand|Select|Wrap|Line Numbers
  1. <% 
  2. DO WHILE NOT rs.EOF %>
  3. <outut your row>
  4. <% rs.Move Next
  5. Loop 
  6. %>
Oct 26 '08 #2
Expand|Select|Wrap|Line Numbers
  1. <% 
  2. DO WHILE NOT rs.EOF %>
  3. <outut your row>
  4. <% rs.Move Next
  5. Loop 
  6. %>
what i mean is ...
to loop the data from database with html element
like texttbox,textarea and etc
Oct 28 '08 #3
GazMathias
202 Expert 128KB
what i mean is ...
to loop the data from database with html element
like texttbox,textarea and etc
Yes, that is what I am illustrating. Put your html markup in the <Output your row> part.

Example with this statement behind it:

"SELECT txtName, txtCompany FROM tblCartoonCharacters"

Expand|Select|Wrap|Line Numbers
  1. <table>
  2. <% DO WHILE NOT rs.EOF %>
  3. <tr>
  4.     <td><%=rs("txtName")%></td>
  5.     <td><%=rs("txtCompany")%></td>
  6. </tr>
  7. <% rs.Move Next
  8. Loop %>
  9. </table>
Will Output

Donald Duck | Disney
Mickey Mouse | Disney
Homer Simpson | Fox
Elmer Fudd | Warner

Etc
Oct 28 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Kay | last post: by
46 posts views Thread by Neptune | last post: by
4 posts views Thread by Troy | last post: by
3 posts views Thread by tzuriel | last post: by
8 posts views Thread by brainflakes.org | last post: by
4 posts views Thread by danbuttercup | last post: by
1 post views Thread by =?ISO-8859-1?Q?Christian_R=FChl?= | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by mdpf | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.