Click here to Skip to main content
14,691,771 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
cmd.Parameters.AddWithValue("@Account_No", txtaccount1.Text + "-" + txtaccount2.Text);

Here I am inserting data in a column from different text boxes, how to retrieve same data from database in different text boxes ????
Updated 22-Nov-12 7:10am

Try using String.Split Method[^].
This method will give you incorrect results if the text in either of the text-boxes have a "-" character. So its better to store the values of both the textbox in separate columns in the database.
Sk. Tajbir 22-Nov-12 12:22pm
nice link.. 5+
Split String
string str;
str = "Ali-Asadi-...";
     string[] master;
       master = str.Split((char)45);//45 Key ASCII -

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