Click here to Skip to main content
15,886,095 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
cmd.Parameters.AddWithValue("@CNIC", txtcnic1.Text + "-" + txtcnic2.Text + "-" + txtcnic3.Text);
Posted
Comments
Manoj Kumar Choubey 24-Oct-12 4:17am    
Please put you foll source code of sub / function .... and elaborate your problem ....
zeshanazam 24-Oct-12 4:20am    
this is a single line of code of inserting data from multiple text boxes in single column of sql database, now i want to search data and show it in text boxes.
Hetal Jariwala 24-Oct-12 6:05am    
retrive data and spilt it from "-"

1 solution

how to fetch data from single column in multilpe text boxes
Your question title speaks of retrieving single column value whereas code looks like inserting multiple values into a single column. Based on title, you need to retrieve the value from a column which probably will be comma separated. Then use Split method and get separate values that can be assigned as per need.

Split returns a string array that contains the substrings of the main string that are delimited by elements of a specified Unicode character array. A parameter specifies whether to return empty array elements.
Refer: MSDN: Split[^]

Sample: C# Split[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900