我在我的下拉列表中有兩個項目。當我選擇第二個項目,然後單擊我的下載按鈕,第一個項目仍然列爲SelectedItem.Value。但是,在網站上,第二個項目列在下拉列表中。ASP.NET DropDownList.SelectedItem.Value
string fileName = downloadRspDropDown.SelectedItem.Value;
try {
FileInfo file = new FileInfo(fileName);
if (file.Exists) {
//perform the transmission of the Excel file}
else {
"File does not exist"}
}
請發佈您的代碼和標記。 – 2010-03-26 18:28:44
從哪裏綁定downloadRspDropDown。它在PageLoad上嗎? – kbvishnu 2010-12-15 04:43:43