PDA

Click to See Complete Forum and Search --> : Newbie to ASP


vbuser1976
Feb 7th, 2001, 09:10 AM
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.

Feb 7th, 2001, 10:46 AM
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?

vbuser1976
Feb 7th, 2001, 11:45 AM
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
Response.Write(...
Thanks again for your help. :)

Feb 8th, 2001, 04:53 AM
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!

vbuser1976
Feb 8th, 2001, 07:32 AM
I just wanted to say thanks. That is what I needed.