ListView(asp.net 3.5)读取用户选择
我用一组问题填写ascx控件(在Web部件中)。每个问题有2组,有4个选项可供回答。 我使用ListView控件来显示此集合ListView(asp.net 3.5)读取用户选择,asp.net,listview,user-controls,Asp.net,Listview,User Controls,我用一组问题填写ascx控件(在Web部件中)。每个问题有2组,有4个选项可供回答。 我使用ListView控件来显示此集合 var itemsToShow = from ... select new { MfKey = item[MVListsManager.MF_KEY], Order = item[MVListsManager.MF_O
var itemsToShow = from ...
select new
{
MfKey = item[MVListsManager.MF_KEY],
Order = item[MVListsManager.MF_ORDER],
MotivationFactor = item[MVListsManager.MF_MOTIVATION_FACTOR]
};
QuestionaryListView.DataSource = itemsToShow;
QuestionaryListView.DataBind();
//QuestionaryListView.ItemCommand += ...
//QuestionaryListView.ItemUpdated += ... i tried this events but they don't fire
我有模板
<LayoutTemplate>
<table width="100%" border="1px" cellspacing="0">
<tr>
<th>Motivation factor</th>
<th>Importance</th>
<th>Satisfaction</th>
</tr>
<asp:PlaceHolder ID="itemPlaceholder" runat="server" />
</table>
</LayoutTemplate>
<ItemTemplate>
<tr>
<td><span><%#Eval("MotivationFactor")%></span></td>
<td><asp:RadioButtonList runat="server" ID="RBLSignificance" CommandName="Significance" CommandArgument='<%#Eval("MfKey")%>'>
<asp:ListItem Selected="True">No answer</asp:ListItem>
<asp:ListItem>Not important</asp:ListItem>
<asp:ListItem>A little bit</asp:ListItem>
<asp:ListItem>Important</asp:ListItem>
<asp:ListItem>Very impoprtant</asp:ListItem>
</asp:RadioButtonList></td>
<td><asp:RadioButtonList runat="server" ID="RBLSatisfaction" CommandName="Satisfaction" CommandArgument='<%#Eval("MfKey")%>'>
<asp:ListItem Selected="True">No answer</asp:ListItem>
<asp:ListItem>Bad</asp:ListItem>
<asp:ListItem>So-so</asp:ListItem>
<asp:ListItem>Good</asp:ListItem>
<asp:ListItem>Very good</asp:ListItem>
</asp:RadioButtonList></td>
</tr>
</ItemTemplate>
我不知道(我已经试了很多次)在他填写问卷后(或期间)如何阅读用户输入
--------------------------------------------
| option1 | option1
1. Question | option2 | option2
| ... | ...
--------------------------------------------