【发布时间】:2017-01-05 18:19:46
【问题描述】:
我有单选按钮列表。 ASP代码:
Auditing: <asp:RadioButtonList ID="RBLAudit" runat="server" Font-Bold="true" RepeatDirection="Horizontal" RepeatLayout="Flow" TextAlign="Left">
<asp:ListItem Value="true" Text=" Audited" Selected="True"/>
<asp:ListItem Value="false" Text=" Not Audited "/>
<asp:ListItem Value="" Text="ALL"/>
</asp:RadioButtonList>
我有带有布尔参数的 RDLC 报告如下:
I want to pass null value when select ALL option of radio button list. 我在后面试试这段代码
If (RBLAudit.SelectedValue <> "") Then
p9 = New ReportParameter("State", RBLAudit.SelectedValue)
ElseIf (RBLAudit.SelectedValue = "") Then
p9 = New ReportParameter("State", DBNull.Value.ToString())
End If
Dim RepParams() As ReportParameter = {p1, p2, p3, p4, p5, p6, p7, p8, p9}
但这在 RBLAudit.SelectedValue = "" 时不起作用。错误是"The value provided for the report parameter 'State' is not valid for its type."
如何为这个布尔参数传递空值?
【问题讨论】:
标签: asp.net vb.net parameter-passing rdlc