How to bind the selected value of a DropDownList

前端 未结 3 764

Data binding is all about declarative code, right? So I specify what I want with attributes, and the framework takes care of the rest. Unless I\'m mistaken and data bindin

3条回答
  •  自闭症患者
    2020-12-15 05:28

    I don't know if it will really help you, but did you tried to setup the "SelectedValue" on Code behind?

    Example:

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        DropDownInfoSource.SelectedValue = "1" ' your value, here
    End Sub
    

提交回复
热议问题