0
我在C#代碼中定義數據源,我有一個提交按鈕這需要在RadioButtonListRadioButtonList.Selectedvalue返回一個空字符串
asp:RadioButtonList ID="RadioPaidIdList" runat="server" DataValueField ="Label" DataTextField = "Label"
首播時間值我點擊提交,返回一個空值。下次我選擇一個radiolist並點擊提交它返回一個合適的值。 奇怪!
我猜你在談論的WebForms。您何時將這些值添加到單選按鈕列表? OnInit,OnLoad或OnPreRender。確保在事件觸發之前添加它們,並且OnInit或OnLoad(如果這樣做)OnPreRender太遲了。 – 2011-04-04 03:42:42