Community discussion forum

Very urgent---Please help me

  • 8 months 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

     

  • Advertisement

    Simply the fastest line-level profiler for .NET ever

    “The low overhead means it has minimal impact on the execution of my program”
    Mark Everest, Development Team Leader, Renault F1 Team Ltd.

    Try out the new ANTS Profiler 4 for yourself. Download your 14-day trial now

  • 8 months 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).