Solved

#eval function on asp.net

Posted on 2009-07-01
3
298 Views
Last Modified: 2012-05-07
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

0
Comment
Question by:philip_doherty
  • 2
3 Comments
 
LVL 5

Expert Comment

by:Muralidharanp
ID: 24753073
Please try the following Code in your aspx page

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


0
 

Author Comment

by:philip_doherty
ID: 24851128
trying it ou
0
 
LVL 5

Accepted Solution

by:
Muralidharanp earned 500 total points
ID: 24867846
let me know the status.
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

New Relic: Our company recently started researching several products to figure out what were the best ways for us to increase our web page speed and to quickly identify performance problems that we may be having. One of the products we evaluated wa…
Foolproof security solutions has become one of the key necessities of every e-commerce or Internet banking website. If you too own an online shopping site then its vital for you to equip your web portal with customer security features that can allow…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question