#eval function on asp.net

Can anyone tell me why this is complaining at compile time?

the second code snippet works fine!
--this doesnt work
 
<AppointmentTemplate>
                          
                             <div style="color: #0000AA; font-size: 10px;">
                                     <%
                                         Dim eee As String = #Eval("CustomerID")
                                         
                                         Dim aaa As String = getCompanyNameFromID(eee)
                                         Response.Write(aaa)
                                     %>
                             </div>
                             
 </AppointmentTemplate>
 
 
--but this does
 
<AppointmentTemplate>
                          
                             <div style="color: #0000AA; font-size: 10px;">
                                     <%#Eval("CompanyName")%>
                             </div>
                             
</AppointmentTemplate>

Open in new window

philip_dohertyAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
MuralidharanpConnect With a Mentor Commented:
let me know the status.
0
 
MuralidharanpCommented:
Please try the following Code in your aspx page

 
         <%# getCompanyNameFromID (Eval("CompanyName").ToString()) %>
 


0
 
philip_dohertyAuthor Commented:
trying it ou
0
All Courses

From novice to tech pro — start learning today.