c# - Conditional binding in ASCX page -
i have custom list object , binding repeater this
<asp:repeater runat="server" id="repeater1"> <itemtemplate> <p>opsigelsesdato:<input type="text" value="<%eval("enddate.month")+ "/01/"+ eval("enddate.year")%>" /></p> </itemtemplate> </asp:repeater>
now want want bind values input if enddate.month
not equal null. there way in ascx page?
you can this:
create public method on page call code-in-front.
e.g. if using c#:
public string processmydataitem(object myvalue) { if (myvalue == null) { return "0"; } return myvalue.tostring(); }
Comments
Post a Comment