How to show record in new form by clicking on name

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default How to show record in new form by clicking on name

    Hi All,

    I have a asp-build grid with some records.
    The name of a record is a {Link}. I want to be able to click
    on the link and open a new asp-form that has an editable grid.
    That form must only show the record which was clicked.

    This is the query I use in the new form:

    SQL = "SELECT * " & _
    "FROM Weapon"
    CountSQL = "SELECT COUNT(*) " & _
    "FROM Weapon"
    Where = "name = '1A'"
    Order = "name"

    '1A' (example) should be changed to the name of the record which was
    clicked on in the first form.

    Regards,
    Marco
    The Netherlands
    Krechting Guest

  2. Similar Questions and Discussions

    1. Submitting a form without clicking submit
      Hi, Can someone tell me how to submit a form from within a scripted page without anyone having to manually click submit ? Is this something...
    2. Send form data via email (pdf) by clicking SUBMIT button
      am trying to create a form that can be sent to an end-user who will process the information on the form. To do this...I have created a button...
    3. Send form by clicking button (by email)
      Hello, how can i send an email by clicking a button? This action should take al data from the fields and send this to an emailaddress... ...
    4. only show pic if there is a record
      Ive got an asp website which has a news function. it pulls through info and a pic ref to a url on the server that in turn puts it onto a page. My...
    5. Show Record Horizontal
      In Macromedia Dreamweaver MX 2004 we can only show Record Vetical using repeat. But one of my compatible web developer in my company show 3 record...
  3. #2

    Default Re: How to show record in new form by clicking on name

    Hi Marco,

    You can pass the name in a querystring, as an option.

    <a href="page.asp?name=1A">Click me</a>

    Links to:

    <%
    Dim sName
    sName = Request.Querystring("name")
    CountSQL = "SELECT COUNT(*) FROM Weapon WHERE [Name]='" & Replace(sName,
    "'", "''") & "'"
    %>


    Some links for reading:
    [url]http://www.aspfaq.com/show.asp?id=2096[/url]
    [url]http://www.aspfaq.com/show.asp?id=2073[/url] (specifically the count(*) thing)
    [url]http://www.aspfaq.com/show.asp?id=2080[/url] (name vs. [name])


    Ray at work

    "Krechting" <m.krechting@chello.nl> wrote in message
    news:a71c776d.0312240121.623e3bbc@posting.google.c om...
    > Hi All,
    >
    > I have a asp-build grid with some records.
    > The name of a record is a {Link}. I want to be able to click
    > on the link and open a new asp-form that has an editable grid.
    > That form must only show the record which was clicked.
    >
    > This is the query I use in the new form:
    >
    > SQL = "SELECT * " & _
    > "FROM Weapon"
    > CountSQL = "SELECT COUNT(*) " & _
    > "FROM Weapon"
    > Where = "name = '1A'"
    > Order = "name"
    >
    > '1A' (example) should be changed to the name of the record which was
    > clicked on in the first form.
    >
    > Regards,
    > Marco
    > The Netherlands

    Ray at Guest

  4. #3

    Default Re: How to show record in new form by clicking on name

    Example URL with a querystring:
    [url]http://www.mysite.com/mydir/mypg.asp?myvar1=hey&myvar2=ho[/url]

    Because a variable might contain some odd characters like spaces, it's
    usually a good idea to use Server.URLEncode when creating a querystring
    from a variable:
    <a href="http://www.mysite.com/mypage?id=<%=
    Server.URLEncode(objRS("MyIDFldFromDB")) %>">objRS("MyIDFldFromDB")</a>

    And in the page that is opened you can use Request.QueryString("id") to
    get the value of id.

    Best regards,
    J. Paul Schmidt, Freelance ASP Web Developer
    [url]http://www.Bullschmidt.com[/url]
    ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...


    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Bullschmidt Guest

Posting Permissions

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

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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139