开发者

How can multiple values in TextBox be saved as multiple rows in a table?

开发者 https://www.devze.com 2023-03-08 19:32 出处:网络
User should be allowed to add multiple values in开发者_JS百科 TextBox ( for example 3 Names ). When Enter button is clicked, the 3 names should be saved in 3 rows (as 3 entries ) of a table.

User should be allowed to add multiple values in开发者_JS百科 TextBox ( for example 3 Names ). When Enter button is clicked, the 3 names should be saved in 3 rows (as 3 entries ) of a table.

Can anyone please help?

Thanks, Vanu


You need to decide what your separator will be, e.g., a line feed or a blank space. Then you can use String.Split to create a string array of your elements. Then, loop through the array and do an INSERT for each.

0

精彩评论

暂无评论...
验证码 换一张
取 消