C# 如何将null传递到asp:Parameter
我有以下代码:C# 如何将null传递到asp:Parameter,c#,.net,C#,.net,我有以下代码: <asp:SqlDataSource ID="dsLeave" runat="server" ConnectionString="<%$ ConnectionStrings:test %>" SelectCommand="app_leave_notification_select" SelectCommand
<asp:SqlDataSource ID="dsLeave"
runat="server"
ConnectionString="<%$ ConnectionStrings:test %>"
SelectCommand="app_leave_notification_select"
SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:Parameter Name="employee_id" Type="int32" />
</SelectParameters>
</asp:SqlDataSource>
有人知道如何将null传递到asp:Parameter employee\u id吗?在参数中添加一个convertEmptyString=true,以便:
<asp:Parameter Name="employee_id"
Type="int32"
ConvertEmptyStringToNull="true" />
在空字符串中添加pass
我从这篇博客文章中得到了这一点:在参数中添加一个ConvertEmptyStringToNull=true,这样它会像:
<asp:Parameter Name="employee_id"
Type="int32"
ConvertEmptyStringToNull="true" />
在空字符串中添加pass
我从这篇博文中得到: