asp.net - How can you assign the value Nothing to a control attribute declaratively in a VB.Net ASPX file? -
if have control has read/write property of type nullable(of integer) (or integer?, if prefer shorthand), how can assign nothing value attribute in aspx/ascx definition (as opposed setting in codebehind)?
e.g. system.web.ui.webcontrols.textbox
control has read/write property called maxlength
of type integer
. can set in aspx including property name attribute in declaration, this:
<asp:textbox id=”mytextbox” runat=”server” maxlength=”30” />
indeed, can set integer?
property in same way long i’m assigning integer, want set property nothing
.
any ideas?
try using data binding expression:
<my:mycontrol runat="server" id="mine" nullableproperty="<%# nothing %>" />
Comments
Post a Comment