If you set the parameter ListItem.Valuevalue before setting its value Text, how Text, and Valuewill be set to the same value. I can get around this, but I just want to know why this is happening? Is it because something “should” should be installed on the screen? And why rewrite when the default is an empty string.
.Net 3.5
ListItem li = new ListItem();
li.Value = "abc"; //Text is now = "abc"
li.Text = "def";
li.Value = "qwe"; //Text remains "def"
source
share