2
Contributors
1
Reply
2
Views
9 Years
Discussion Span
Last Post by rajarajan07
0

Place one dropdownlistbox and dont forget to give "autopostback=true". A button to set value and a label to show the value. Write the coding as below

protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If IsPostBack=False then
           ddltest.Items.Add(New ListItem("Plz Select"))
            ddltest.Items.Add(New ListItem("One"))
            ddltest.Items.Add(New ListItem("two"))
            ddltest.SelectedIndex = 0
End if
Protected Sub ddltest_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddltest.SelectedIndexChanged
        lbltest1.Text = ddltest.SelectedValue
End Sub
Protected Sub btntest1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btntest1.Click
        ddltest.SelectedItem.Value = Val(ddltest.SelectedItem.Value) + 10
End Sub

You can set the value to combo box items like this... If you got it, plz add to my reputation and mark it as solved.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.