Hello, I need some help, urgently.. I have got a listbox where the
information is retrieved from a database. So for example, if the first row
is selected and the button is pressed, I want just the first field to be
displayed in the text box provided. So if the first one is selected then in
the text box , it should say 1
1, help, test
2, help2, test2
3, help3, test3
Button
Thank you
DanOn Apr 19, 5:26 pm, Daniel <Dan...@.discussions.microsoft.com> wrote:
> Hello, I need some help, urgently.. I have got a listbox where the
> information is retrieved from a database. So for example, if the first ro
w
> is selected and the button is pressed, I want just the first field to be
> displayed in the text box provided. So if the first one is selected then
in
> the text box , it should say 1
> 1, help, test
> 2, help2, test2
> 3, help3, test3
> Button
> Thank you
> Dan
string lb = ListBox1.SelectedValue;
string[] s = lb.Split(',');
TextBox1.Text = s[0];
It is not working, maybe it is because i am using vb.net. Can you help me
please.
"Alexey Smirnov" wrote:
> On Apr 19, 5:26 pm, Daniel <Dan...@.discussions.microsoft.com> wrote:
> string lb = ListBox1.SelectedValue;
> string[] s = lb.Split(',');
> TextBox1.Text = s[0];
>
On Apr 20, 1:36 pm, Daniel <Dan...@.discussions.microsoft.com> wrote:
> It is not working, maybe it is because i am using vb.net. Can you help me
> please.
>
> "Alexey Smirnov" wrote:
>
>
>
>
>
> - Show quoted text -
Dim lb As String = ListBox1.SelectedValue
Dim s() As String = lb.Split(",")
TextBox1.Text = s(0)
Thank you for your help, it is working now. I need one more help, the list
box has got a multiple selection property, so if multiple value are selected
,
how can i get the first value for each select value?
Thank you
Dan
"Alexey Smirnov" wrote:
> On Apr 20, 1:36 pm, Daniel <Dan...@.discussions.microsoft.com> wrote:
> Dim lb As String = ListBox1.SelectedValue
> Dim s() As String = lb.Split(",")
> TextBox1.Text = s(0)
>
On Apr 20, 1:58 pm, Daniel <Dan...@.discussions.microsoft.com> wrote:
> Thank you for your help, it is working now. I need one more help, the lis
t
> box has got a multiple selection property, so if multiple value are select
ed,
> how can i get the first value for each select value?
> Thank you
> Dan
>
> "Alexey Smirnov" wrote:
>
>
>
>
>
>
>
>
> - Show quoted text -
Dim i As ListItem
For Each i In ListBox1.Items
If i.Selected Then
Dim lb As String = i.Value
Dim s() As String = lb.Split(",")
TextBox1.Text &= s(0)
End If
Next
Thank you very much. You dont realise how you helped me today.
"Alexey Smirnov" wrote:
> On Apr 20, 1:58 pm, Daniel <Dan...@.discussions.microsoft.com> wrote:
>
> Dim i As ListItem
> For Each i In ListBox1.Items
> If i.Selected Then
> Dim lb As String = i.Value
> Dim s() As String = lb.Split(",")
> TextBox1.Text &= s(0)
> End If
> Next
>
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment