0

在一个事件中,我的文本框字段是从 SQL 数据库填充的。文本框没什么好看的,只有一个 ID、TextMode 和一些 CSS。

这是背景代码:

Protected Sub LocationControl_SelectedIndexChanged(sender As Object, e As EventArgs) Handles LocationControl.SelectedIndexChanged
    If LocationControl.SelectedValue = "(New Location)" Then
        Clear()
    Else
        Dim filter As String = "locationID = '" + LocationControl.SelectedValue.ToString() + "'"
        Dim dv As DataView = CType(SqlDataSource1.Select(DataSourceSelectArguments.Empty), DataView)
        dv.RowFilter = filter
        For Each drv As DataRowView In dv
            LocName.Text = drv("locationName").ToString()
            LocAddress.Text = drv("locationAddress").ToString()
            LocDirections.Text = drv("drivingdirections").ToString()
            LocURL.Text = drv("URL").ToString()
            statusDDL.SelectedValue = drv("statusID").ToString()
        Next
    End If

End Sub

该代码有效,但是当我在任何浏览器下运行它时,但 IE 会在所有多行文本框之上创建任何额外的行。

有任何想法吗?

4

0 回答 0