Link to home
Start Free TrialLog in
Avatar of philip_doherty
philip_doherty

asked on

#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

Avatar of Muralidharanp
Muralidharanp

Please try the following Code in your aspx page

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


Avatar of philip_doherty

ASKER

trying it ou
ASKER CERTIFIED SOLUTION
Avatar of Muralidharanp
Muralidharanp

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial