Results 1 to 5 of 5

Thread: Newbie to ASP

  1. #1

    Thread Starter
    Hyperactive Member vbuser1976's Avatar
    Join Date
    Sep 2000
    Location
    Yonkers, NY
    Posts
    404

    Cool

    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.
    -vbuser1976
    VB6 Enterprise SP6
    SQL 7.0 SP2
    VBScript, HTML, Javascript, C++, a little UNIX

  2. #2
    Guest
    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?

  3. #3

    Thread Starter
    Hyperactive Member vbuser1976's Avatar
    Join Date
    Sep 2000
    Location
    Yonkers, NY
    Posts
    404

    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
    Code:
    Response.Write(...
    Thanks again for your help.
    -vbuser1976
    VB6 Enterprise SP6
    SQL 7.0 SP2
    VBScript, HTML, Javascript, C++, a little UNIX

  4. #4
    Guest
    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!

  5. #5

    Thread Starter
    Hyperactive Member vbuser1976's Avatar
    Join Date
    Sep 2000
    Location
    Yonkers, NY
    Posts
    404

    Talking Thanks a lot!

    I just wanted to say thanks. That is what I needed.
    -vbuser1976
    VB6 Enterprise SP6
    SQL 7.0 SP2
    VBScript, HTML, Javascript, C++, a little UNIX

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width