APS.NET MVC - BD data split

Asked

Viewed 25 times

-1

I need to do a function in VB which allows to list in a Dropdown the data of a field in the database.

inserir a descrição da imagem aqui

I have to list the data from the 'Eixox' field (in the figure above) in the Dropdown. The doubt is in the following: I need to list the BD data from a certain ID, for example ID=1, where I will have to split by ',' of what is in the 'Eixox' Field'.

So far I’ve managed to do the following:

inserir a descrição da imagem aqui

As you can see it lists all lines of the 'Eixox' field'.

How can I make him list only the field from a certain ID, having to split its content and present each one individually? For example, for ID=1 you would have to display the following:

inserir a descrição da imagem aqui

1 answer

0

Does the select to recover by id, and split the return of the Eixox column so for example:

 eixoX = "a1, a2, a3"
 Dim eixoSValores As String() = eixoX.Split(New Char() {","c})
  • Thanks! I’ll see if I can solve it using this strategy :)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.