我有一个下拉列表,它在第二页上从单独的下拉列表选定值绑定。该数字应为“563000”,但当列表填充时,它显示为... 5 3 6 0 0 0 Vertically?? 这是我用来绑定的代码。
Protected Sub button1_Click(sender As Object, e As EventArgs) Handles button1.Click
Dim val1 As String = DropDownList1.SelectedValue.Substring(0, 6)
Dim val2 As String = DropDownList1.SelectedValue.Substring(0, 4)
Session("value1") = val1.ToString
Session("value2") = val2.ToString
Response.Redirect("Page2.aspx")
End Sub
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
DropDownList1.DataSource = CType(Session.Item("value1"), String)
DropDownList1.DataBind()
DropDownList2.DataSource = CType(Session.Item("value2"), String)
DropDownList2.DataBind()
End Sub
有人知道为什么我会发生这种情况吗?