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. when checkboxes is selected the data should be store in two tables

when checkboxes is selected the data should be store in two tables

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netdatabasesql-serversysadmin
4 Posts 4 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
    developerit
    wrote on last edited by
    #1

    hi, iam using asp.net with c#, with sql server 2000 in my gridview iam displaying data from view at page load event the 1st column is checkbox in template field,2nd is categorynamee,3rd is itemkey, 4th is itemkeyname 5th is currentqty, 6th is salesprice,7th is quantity, 8th is total i have to insert into two tables 1st table orders orderno int primary key autoincrement, username nvarchar(50) , shopname nvarchar(50), email nvarchar(100) 2nd table is Orderdetails serialno int primarykey autoincrement, orderno int foreignkey, categorynamee nvarchar(50), itemkey nvarchar(50), itemkeyname nvarchar(50), currentqty decimal, salesprice decimal, quantity int, total decimal when user selects any no of the checkboxes that rows should be added in both tables, iam getting errors can you give examples which helps me

    B A N 3 Replies Last reply
    0
    • D developerit

      hi, iam using asp.net with c#, with sql server 2000 in my gridview iam displaying data from view at page load event the 1st column is checkbox in template field,2nd is categorynamee,3rd is itemkey, 4th is itemkeyname 5th is currentqty, 6th is salesprice,7th is quantity, 8th is total i have to insert into two tables 1st table orders orderno int primary key autoincrement, username nvarchar(50) , shopname nvarchar(50), email nvarchar(100) 2nd table is Orderdetails serialno int primarykey autoincrement, orderno int foreignkey, categorynamee nvarchar(50), itemkey nvarchar(50), itemkeyname nvarchar(50), currentqty decimal, salesprice decimal, quantity int, total decimal when user selects any no of the checkboxes that rows should be added in both tables, iam getting errors can you give examples which helps me

      B Offline
      B Offline
      Brij
      wrote on last edited by
      #2

      So at the time of subit, Iterate throgh all the gridview rows and which row has checkbox checked, save it in database.You can save the data in both the table using query. Where are you actually facing problem?

      Cheers!! Brij Check my latest Article :Exploring ASP.NET Validators

      1 Reply Last reply
      0
      • D developerit

        hi, iam using asp.net with c#, with sql server 2000 in my gridview iam displaying data from view at page load event the 1st column is checkbox in template field,2nd is categorynamee,3rd is itemkey, 4th is itemkeyname 5th is currentqty, 6th is salesprice,7th is quantity, 8th is total i have to insert into two tables 1st table orders orderno int primary key autoincrement, username nvarchar(50) , shopname nvarchar(50), email nvarchar(100) 2nd table is Orderdetails serialno int primarykey autoincrement, orderno int foreignkey, categorynamee nvarchar(50), itemkey nvarchar(50), itemkeyname nvarchar(50), currentqty decimal, salesprice decimal, quantity int, total decimal when user selects any no of the checkboxes that rows should be added in both tables, iam getting errors can you give examples which helps me

        A Offline
        A Offline
        Ashfield
        wrote on last edited by
        #3

        Easy, your code is wrong - what else do you expect it to be? Without seeing your code or knowing what errors you are getting someone is meant to help you fix the problem. Can you see where the problem really lies?

        Bob Ashfield Consultants Ltd

        1 Reply Last reply
        0
        • D developerit

          hi, iam using asp.net with c#, with sql server 2000 in my gridview iam displaying data from view at page load event the 1st column is checkbox in template field,2nd is categorynamee,3rd is itemkey, 4th is itemkeyname 5th is currentqty, 6th is salesprice,7th is quantity, 8th is total i have to insert into two tables 1st table orders orderno int primary key autoincrement, username nvarchar(50) , shopname nvarchar(50), email nvarchar(100) 2nd table is Orderdetails serialno int primarykey autoincrement, orderno int foreignkey, categorynamee nvarchar(50), itemkey nvarchar(50), itemkeyname nvarchar(50), currentqty decimal, salesprice decimal, quantity int, total decimal when user selects any no of the checkboxes that rows should be added in both tables, iam getting errors can you give examples which helps me

          N Offline
          N Offline
          nagendrathecoder
          wrote on last edited by
          #4

          What errors are you getting?

          developerit wrote:

          can you give examples which helps me

          Search google, you'll find many examples on this.

          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