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