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. what datasource control to use on a web from 2010

what datasource control to use on a web from 2010

Scheduled Pinned Locked Moved ASP.NET
2 Posts 2 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.
  • D Offline
    D Offline
    dcof
    wrote on last edited by
    #1

    In a vb.net 2010 web form application, I have a request from the user to be able to insert,update, and/or delete a row in a single table. Thus I have the following questions to ask: 1. I am trying to decide if I should use a detailsviews, formview, gridview, and/or a different control for this purpose. Thus would you tell me what control you would recommend and why you would recommend that particular control? 2. For the different options for insert, update, and delete, would I use the buttons that are on the control that you recommend? If not would I use, new buttons that I place on the webform page? 3. For the control that you recommend that I use, should I place the sql 'embedded' in the sqldatasource, the control you recommend and/or access the sql from a different location(vb.net code in a new location)? Would you tell me , show me with pictures, and/or point to me to links (urls) that will show me how to accomplish this

    P 1 Reply Last reply
    0
    • D dcof

      In a vb.net 2010 web form application, I have a request from the user to be able to insert,update, and/or delete a row in a single table. Thus I have the following questions to ask: 1. I am trying to decide if I should use a detailsviews, formview, gridview, and/or a different control for this purpose. Thus would you tell me what control you would recommend and why you would recommend that particular control? 2. For the different options for insert, update, and delete, would I use the buttons that are on the control that you recommend? If not would I use, new buttons that I place on the webform page? 3. For the control that you recommend that I use, should I place the sql 'embedded' in the sqldatasource, the control you recommend and/or access the sql from a different location(vb.net code in a new location)? Would you tell me , show me with pictures, and/or point to me to links (urls) that will show me how to accomplish this

      P Offline
      P Offline
      petter2012
      wrote on last edited by
      #2

      The traditional way of solving this is using a master/detail scenario: 1. Drag a gridview to the site, and bind it to the database's table. Rightclick it and choose to have a Select field shown. 2. Drag a details view to the page, and bind it as well. In its bidning window, you can graphically set a WHERE statement. Set your statement to Control, then chose your gridview as the control. Also click the advanced button to enable DELETE, UPDATE, and INSERT. If done right, this means that when a user clicks the Select button for a particular row in the gridview, this row's data will appear in the detailsview. Then it can be updated or deleted, and more data can be inserted from the detailsview. I don't know how much you know about binding to a database, but be sure you stay out of SQL injection trouble. Note that searching for master/detail, gridview and detailsview you should be able to fond a lot of info on how to do this. Good luck!

      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