Reputation: 1917
In the example below, the DefaultValue of my Foo Parameter passes a null
value instead of string.Empty
<asp:ObjectDataSource ID="MyDataSource" runat="server" SelectMethod="GetAll"
UpdateMethod="MyUpdateMethod" TypeName="My.Namespace.MyProvider">
<UpdateParameters>
<asp:Parameter Name="Key" Type="Int16" />
<asp:Parameter Name="Foo" Type="String" DefaultValue="" />
</UpdateParameters>
</asp:ObjectDataSource>
Though I can handle that in MyUpdateMethod
, is there a way to set the DefaultValue
of a string parameter to an empty string ?
Upvotes: 1
Views: 3253
Reputation: 15673
<asp:Parameter Name="Foo" Type="String" ConvertEmptyStringToNull="false" />
Upvotes: 5