DropDownList Selected選擇
找了很久!!這方法才是正確的
try
{
DropDownList.selectindex = -1;
DropDownList.Items.FindByValue(值).Selected = true;
}
catch
{
DropDownList.selectindex = 0;
}
try
{
DropDownList.selectindex = -1;
DropDownList.Items.FindByValue(值).Selected = true;
}
catch
{
DropDownList.selectindex = 0;
}
留言
張貼留言