Very urgent---Please help me

asp.net Vicenza, Italy
  • 12 years ago

    I have done a coding for adding items frm listbox to testbax ,after clicking button.

    I used the code like this.


    Private strBuild As New System.Text.StringBuilder

        Private str As String

     Protected Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

            strBuild.Append(TextBox1.Text)
            str = strBuild.ToString()
            If str = " " Then
                strBuild.Append(ListBox1.SelectedValue)
            Else
                strBuild.Append(ListBox1.SelectedValue)
                strBuild.Append(",")
            End If
            TextBox1.Text = strBuild.ToString()

    Is there any disadvantage for this way of using ListBox to Textbox...
    Can we delete(remove) the item in TextBox if i entered it wrongly....

    Please advice...
    Thanks,
    Beena

     

  • 12 years ago

    The logic u written is ok, but it depends on ur requirement. So first clear that.

     Jeevesh

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“A computer lets you make more mistakes faster than any other invention in human history, with the possible exceptions of handguns and tequila” - Mitch Ratcliffe