Asp.NET DropDownList SelectedItem.Value not changing

前端 未结 5 1855
庸人自扰
庸人自扰 2021-01-07 23:40

markup:

            
5条回答
  •  忘掉有多难
    2021-01-08 00:24

    So this answer is the "obvious" solution to the most common cause. However, there is one more surprising issue that can cause this! My list values came from a database and the values had linefeed and carriage return: "\r\n". These values look like an innocent space, but actually they are not! My solution was to remove these hidden Char values. Hope it helps.

提交回复
热议问题