John D
John D

Reputation: 687

Can I use a defaultvalue for an ObjectDataSource Update-Parameter?

Can I use this ASPX-code in defining my ObjectDataSource control?

<UpdateParameters>
   <asp:Parameter Name="UID_KEY" Type="Int32"  DefaultValue="<%= hidUID_KEY.V"ALUE %>"/>

I am not fluent in the "ASP" special tags (<%= or <%...other tags, not sure if <%= is the correct syntax.) Further...must I convert the hidden-control-STRING to an Int32?
If so, please show me how to cast it within the above ASPX code. Thanks...John

Upvotes: 0

Views: 269

Answers (1)

Thomson Mixab
Thomson Mixab

Reputation: 657

Here is the example and the URL for more detail to use asp.net inline expression.

https://learn.microsoft.com/en-us/troubleshoot/aspnet/inline-expressions

 <asp:Parameter Name="UID_KEY" Type="Int32"  DefaultValue="<%= Convert.ToInt32(hidUID_KEY.Value) %>"/>

Upvotes: 1

Related Questions