Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. how to get the ID of the selected item in listview itemtemplate in asp.net2008

how to get the ID of the selected item in listview itemtemplate in asp.net2008

Scheduled Pinned Locked Moved ASP.NET
tutorialcsharpjavascriptasp-nethelp
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bsurendra
    wrote on last edited by
    #1

    i am trying to create a shopping cart, on productdetails page i displaying productid, ProductName, productImage, ProductPrice and Buy Now Button. i have also created a movable shopping cart by using javascript. Now my problem is i am not able to pick the selected items id and send it javascript function for shopping cart. please guide me how to pick the id of the selected item and send it to the javascript function. Thanks in Advance

    J P 2 Replies Last reply
    0
    • B bsurendra

      i am trying to create a shopping cart, on productdetails page i displaying productid, ProductName, productImage, ProductPrice and Buy Now Button. i have also created a movable shopping cart by using javascript. Now my problem is i am not able to pick the selected items id and send it javascript function for shopping cart. please guide me how to pick the id of the selected item and send it to the javascript function. Thanks in Advance

      J Offline
      J Offline
      jkirkerx
      wrote on last edited by
      #2

      I don't understand your question? pick up the productID, pick it up from where? The buy now button? [edit] you can try a hidden textbox, use javascript to place the part number in it, and then read the textbox

      1 Reply Last reply
      0
      • B bsurendra

        i am trying to create a shopping cart, on productdetails page i displaying productid, ProductName, productImage, ProductPrice and Buy Now Button. i have also created a movable shopping cart by using javascript. Now my problem is i am not able to pick the selected items id and send it javascript function for shopping cart. please guide me how to pick the id of the selected item and send it to the javascript function. Thanks in Advance

        P Offline
        P Offline
        poongunrans
        wrote on last edited by
        #3

        use this format onClinentClick="Script_Name(this.id);" function Script_Name(id) { var oID = document.getElementByID(id).value; alert(oID); }

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups