-
Hi everyone!
I am a newbie when it comes to ASPs. I am doing my first website with ASP and I need some assistance. I currently have a ASP that is running a query and listing the results. I decided, for visual purposes, to put the results in an HTML table. Now this is what I want to do:
At the last column, I want to add two buttons...One to view the record and one to edit the record. The view button I just want it to do a view details of the record, and the edit button, I want it to go to a separate asp or html (whichever one is best) and have the ability to edit that record. Any suggestions/ideas?
Thanks in advance.
-
you could put a href containing the id of your record;
<a href=detail.asp?id = <%=objRS("id")%>>detail</a>
<a href=edit.asp?id = <%=objRS("id")%>>edit</a>
does this help you?
-
yes, but...
How do i put it in vbscript. I am adding the links in the script code, but when I use the <% %>, it gets back out of the script code. Do u understand what I mean?
For example, what do I write after
Thanks again for your help. :)
-
You put everything that is html between double quotes;
like this:
response.write "<a href=detail.asp?id=" & objRS("id") & ">edit</a>"
make sure you arrange it nicely in your code, if not it can get quite messy!
you want a good place to learn a lot (check out the faq's); www.4guysfromrolla.com
bye!
-
Thanks a lot!
I just wanted to say thanks. That is what I needed.