我的两个dropdownlist是通过“选择数据源”建立的联动,但是出现“输入字符串的格式不正确”的错误 这是什么原因啊 代码如下:
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource1"
DataTextField="SurveyName" DataValueField="SurveyName">
</asp:DropDownList><asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:voteConnectionString3 %>"
SelectCommand="SELECT * FROM [Survey_Poll]"></asp:SqlDataSource>
<asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource2"
DataTextField="QuestionName" DataValueField="QuestionName">
</asp:DropDownList><asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:voteConnectionString3 %>"
SelectCommand="SELECT * FROM [Survey_Question] WHERE ([SurveyId] = @SurveyId)">
<SelectParameters>
<asp:ControlParameter ControlID="DropDownList1" Name="SurveyId" PropertyName="SelectedValue"
Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource1"
DataTextField="SurveyName" DataValueField="SurveyName">
</asp:DropDownList><asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:voteConnectionString3 %>"
SelectCommand="SELECT * FROM [Survey_Poll]"></asp:SqlDataSource>
<asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource2"
DataTextField="QuestionName" DataValueField="QuestionName">
</asp:DropDownList><asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:voteConnectionString3 %>"
SelectCommand="SELECT * FROM [Survey_Question] WHERE ([SurveyId] = @SurveyId)">
<SelectParameters>
<asp:ControlParameter ControlID="DropDownList1" Name="SurveyId" PropertyName="SelectedValue"
Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货