c# - Compiler Error Message: CS0103: The name 'Bind' does not exist in the current context -


i'm having problem accessing property want use condition on whether or not display particular element

<%if( (int)(bind("defaultaddress.addresstype"))==1) { %> <td> ..... .... </td> <% }%>  

this gives:

compiler error message: cs0103: name 'bind' not exist in current context

however elsewhere on same .aspx page have:

<td class="return"  align="left">                 <asp:label id="label9" text='<%# bind("defaultaddress.country") %>' runat="server" />             </td> 

which works perfectly. note defualtaddress instance of address object , country , addresstype properties of object

i tried

 <% if (defaultaddress.addresstype==1) 

but above code defaultaddress highlighted in red , when hover on error message: cannot resolve symbol 'defaultaddress'

bind can used <%# tag.. if remember correctly (webforms long ago me ... ).


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -