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. dropdownbox contain all the values want to store...,

dropdownbox contain all the values want to store...,

Scheduled Pinned Locked Moved ASP.NET
tutorialquestion
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.
  • M Offline
    M Offline
    Member 3879881
    wrote on last edited by
    #1

    Hi i have list of values in my dropdownlistbox..., All those want to be store in my table..., How to do that? Ex: This is my code: Dim strinsertproc As String strinsertproc = "submitManPowerDetails '" & Val(ddlContractor.SelectedItem.Value) & "','" & Val(ddlProject.SelectedItem.Value) & "'" sqlcmd = New SqlCommand(strinsertproc, sqlconn) sqlcmd.Connection.Open() sqlcmd.ExecuteNonQuery() sqlcmd.Connection.Close() sqlcmd.Dispose() See in that ddlproject is dropdownlistbox..., The above code will store which value have selected that one only..., But instead of that in that what are the values that dropdownbox contains, all the values want to store in my table..., How to do that one..., Plz hlp me,

    Regards, Magi

    N 1 Reply Last reply
    0
    • M Member 3879881

      Hi i have list of values in my dropdownlistbox..., All those want to be store in my table..., How to do that? Ex: This is my code: Dim strinsertproc As String strinsertproc = "submitManPowerDetails '" & Val(ddlContractor.SelectedItem.Value) & "','" & Val(ddlProject.SelectedItem.Value) & "'" sqlcmd = New SqlCommand(strinsertproc, sqlconn) sqlcmd.Connection.Open() sqlcmd.ExecuteNonQuery() sqlcmd.Connection.Close() sqlcmd.Dispose() See in that ddlproject is dropdownlistbox..., The above code will store which value have selected that one only..., But instead of that in that what are the values that dropdownbox contains, all the values want to store in my table..., How to do that one..., Plz hlp me,

      Regards, Magi

      N Offline
      N Offline
      nateraaaa
      wrote on last edited by
      #2

      How do you populate your drop down list? Do you use a stored proc or some other method to populate the drop down list? You will need to change your insert stored proc to accept a varchar and then pass in the values populated in your drop down list via a string array. I am still confused at why you would want to save this information though. Your insert proc should only be inserting what was selected by the user and adding that to your database table. Will the items in your drop down list be changing very often? Nathan

      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